On any model of the iPhone, there is a security feature that will ensure that anybody that tries to guess your passcode can’t get in. After so many tries, your phone will be disabled for a short time (Typically a minute) and then you can try your passcode again. After too many attempts, it will be disabled for longer and longer.
When your phone is disabled, the screen will read “iPhone is disabled, please connect to iTunes”. First, you’ll want to download iTunes on whichever computer you want to use. You can download it here. LINK. When you have downloaded it, open it and connect your phone. Grab the charging cord that
came with your phone and connect it by USB to your computer. If it does not
have the “connect to iTunes” message you can sync your phone (given you
remember the passcode). Whether you can sync it or not, the next step is the
same. You’ll want to restore your iPhone. Hopefully you made a backup
previously, but if you did not, unfortunately you’ll still have to restore your
phone, there is no way around the disabled lock.