Is it actually locked, or you just received a message to that effect?
If It looks like your device has been locked using the Find My Mac / iPhone / iPad hack. This is possible when the hacker discovers, guesses or is given via a phishing scam your Apple ID and Password.
Read this discussion for more information and possible actions.