How to unlock my iphone if it says plug into itunes?

I found my old phone but i couldn't remember the password! I tried and it says to connect to itunes but when i do it says it cant enter my phone until i enter the password. Help

Did it come with a key? That's a joke. Anyways, Im an iOS tech Advisor for Apple and honestly, probably half of the calls I get are about unlocking their phones…

Make sure you have the latest version of iTunes installed and open on your computer.
Make sure the phone is turned off.
Hold down the home button (the little round on in the front)
While you are holding the button down plug the phone into your computer.
Keep holding it down, and in 10 - 15 seconds later a screen will pop up that has a USB cable, an arrow and the iTunes symbol.
When that page pops up you can let go of the button
On your computer something will pop up and say "iTunes detects an iPhone in recovery mode"

When you do all this everything including iOS will be removed from the phone and then iTunes will reinstall the software. Essentially it will be in factory condition.