Welcome to iPhoneForums!
If you forgot the passcode on your iPhone, the one you have to enter when you wake it, you have to erase your device. There are two ways to get this done:
You can use iTunes on your computer. Put your iPhone into recovery mode and restore it. Here are the instructions:
If you can't update or restore your iPhone, iPad, or iPod touch
If Find my iPhone is enabled for iCloud, you can also erase it via iCloud. Open
www.icloud.com/find in a browser on your computer. Click All Devices at the top, then select your iPhone. Choose Erase.