Unfortunately, you must restore it in iTunes on your computer. There is no way to retrieve a forgotten pass lock code.
Connect to iTunes on the computer you usually Sync with and “ Restore “...
If you Restore the phone from the last computer you synced to it will remove the passcode and preserve your data. If you can't do this the only option is to restore it as New, which will delete all of your content. See: http://support.apple.com/kb/HT1212 for more details.