Restore using recovery mode
If you've never synced with iTunes or set up Find My iPhone in iCloud, you'll need to use recovery mode to restore your device. This will erase the device and its passcode.
Connect your iOS device to your computer and open iTunes. If you don't have a computer, borrow one from a friend, or go to an Apple Retail Store or Apple Authorized Service Provider.
While your device is connected, force restart it: Press and hold the Sleep/Wake and Home buttons at the same time. Don't let go when you see the Apple logo — keep holding until you see the recovery mode screen.