With the release of new version of iPad (iPad 2), Apple also released a new Smart Cover. Smart Cover is a magnetic cover for iPad 2 which does more than just covering the iPad. The Smart Cover hinges itself to the side of the iPad and makes itself as a cover. The Smart Cover makes iPad do things no other cover can. Close it, and iPad automatically goes to sleep. Open it, and iPad instantly wakes up without any need to press any buttons.
But in case you do not want the iPad 2 to sleep or lock when closing the smart cover, you can change the settings. To do this, open Settings-> General. Under the general settings, you can see the option “iPad Cover Lock/Unlock”, turn it off to prevent the iPad from going into sleep mode when you close the smart cover.
Anytime you want the feature back, you can enable it from the same settings.