Luckily, Apple provides a page with information on how to reset/recover your device's functionality. Access the page and use the information presented to unlock the device. The easiest method is to use iTunes and then Restore Device option from iTunes. This option resets you device and restores its functionality.