You need to put the device in to recovery mode while connected to iTunes. You'll be prompted to either completely restore the device to factory settings, or restore to an earlier profile of the device that has been saved. Here's a link with a bit more detail: http://osxdaily.com/2011/01/16/forgot-iphone-passcode-how-to-reset/
Hope this helps.
I've forgotten my passcode, is there a way to reset the phone so i can enter a new code?