Welcome to iMore! Are you getting a message for your phone stating that you've entered an incorrect passcode or is your phone acting like it's frozen up? Ether way, reset your device by holding the power button and home button down simultaneously until you see the Apple boot logo.
If you're still having issues, a device restore through iTunes is in order. This Apple Support article will help you with the process: https://support.apple.com/en-us/HT204306