New Macbook Pro 2012 Operating System onto new SSD?
Macs that shipped with Lion or newer come with a recovery feature which is part of the EFI firmware, so that if the hard drive fails, or you install a new hard drive without OS X, the computer can start recovery directly from the internet over a broadband connection. 

To start Recovery, hold down the Command + R keys while booting. The interface is pretty straightforward after that and you should be able to figure it out.

Apple also has as support article on OS X Recovery, and one on which models can support internet recovery through a firmware update.