On Macs that shipped with OS X 10.7 or later, you cannot simply remove the stock drive and replace it with a new one without some initial preparation.
There are two methods you can select to transfer your data and OS.
Internet Recovery Mode via Apple Knowledge Base Article #HT4718
http://support.apple.com/kb/HT4718
NOTE:
If moving a drive from another Mac, using this method will completely erase the drive's data. Make SURE you have a Time Machine® backup or clone of your drive on another device.
Recovery Partition Restore Mode
- Perform your drive upgrade.
- Place your original drive in an external enclosure.
- Boot to the recovery partition on your original drive by holding down Command-R and starting up.
- Use Disk Utility to Restore to your new drive.
- Restart or Boot your Mac to the new drive.