reinstall OS on a new HDD I was given a MBP that needs some repairs. Aparently the hard drive is fried so I was planning to replace it with a new one.  

Is there a way to download a disk to re install the OS after I get a new HDD in it?
If there is how does licensing work? I am used to windows computers where the Key is on the bottom of the machine. I don't see a key of any kind.
I'm also not sure what version of OSX it should be running.
You can just install the new hard drive and if you have a connection to the internet when you first boot up you can download Mac OS X directly from apple.  If you hold the alt key while the machine is booting it will take you directly to Internet Recovery. 

Some features like iPhoto will be missing from this "free" version however they are very cheap and easy to install afterwards via the app store.

This process was tested on a 2011 MBP, also because you have to download the entire OS the process is quite lengthy.