Thank you for allowing me to assist you, my name is Joe and I will be happy to assist you with your concern today.
A passcode is only required when in settings it is set to use one, otherwise when you unlock the phone there is no passcode required. Is the passcode problem the only problem you are having with the device? Do you remember your passcode?
You can simply enter you passcode and then go in settings and set no passcode from lock, if you do not remember it then you will need to restore the phone, hopefully you have preformed a backup to itunes or icloud and then you can restore from backup, upon restore you will have access to the device again. If you are sure you are entering the correct code then please reset the phone by holding the lock and home buttons until the apple logo comes up then release and see if this fixes the problem first before restoring.
Thank you!- Joe
Please rate my answer when ready. Bonuses are appreciated. If for any reason you are not satisfied please reply back to me for further assistance to which I will be glad to help you. If you have any problems for any reason please reply back and let me know.Thanks again for using justanswer and have a great day!
If you need any further assistance you can reply back at any time for my help.I'd be happy to answer any other questions you have even if not related.