There are a number of ways to do this.
The "built-in" way to do this (in case your drive ever dies and you do not have a backup) is to use the Internet Recovery option of Recovery Mode that is built into the firmware. Every Mac since Lion (aka 10.7.x) was introduced (and a few before Lion that were updated with a firmware update) can phone home to Apple's servers to download the "original" version of the Mac OS for that model Mac. In the case of your Mac, that would be Lion (aka 10.7.2ish). From there, you can then download either the latest and greatest from the App Store (right now that would be 10.12.x) OR any other previously "purchased" (I put purchased in quotes because since the newer versions are free, they technically aren't purchased in a way, but you had to have downloaded them from the App Store at some point, which in essence "purchases" them for you)version that you might want to use other than the current version (such as if you want to keep using 10.11.x).
The problem with this ways is that it is SLOOOOOOWWW unless you have a really fast Internet connection. You are downloading the originally installed version and then updated version (unless you have the 10.11.x installer that you downloaded previously from the App Store when you updated to 10.11). If you want to go with this option, then you just install the new blank drive in the computer and boot it up while holding down the Command-R keys. This will boot you into the Recovery Mode. It should be pretty self-explanatory from there, but if you need further guidance, then there is this page (since it will be a blank drive, you will go to Internet Recovery):https://support.apple.com/en-us/HT201314
If you want a faster option, then the best option is to put the new drive in an external drive enclosure (USB 2.0 enclosure will do, but I would suggest Firewire 800 instead as it will be the faster option, but you will find fewer Firewire 800 enclosures out there...if you want to go the Firewire route, then I suggest this enclosure: https://eshop.macsales.com/item/OWC/MEPMU3F8K/
) and then use a macOS installer downloaded from the App Store to install the macOS on that external drive. The macOS installer should allow you to choose the external drive. This option should be the fastest, especially if you already have the macOS installer downloaded from the App Store (i.e. say you backed up the installer you used to upgrade to 10.11). If you don't have it already downloaded, then you are downloading the OS only once (as opposed to twice with the Internet Recovery option). Of course, this option requires you to buy an external enclosure, so it will be the more expensive option, but then when you install the new drive with the newly installed macOS in the MacBook Pro, you can then put the old drive in the enclosure to use as you see fit. Note that you can either install the most up to date version of the macOS (aka 10.12) or any previously "purchased" macOS version you have in the App Store...you just will have to download it (older version that your "purchased" will appear on the "purchased" tab in the App Store). This is the option I would likely suggest, unless you are fine with the Internet Recovery option.
The last option is to try to create bootable install media (either a USB flash drive or optical disc) from a macOS install file downloaded from the App Store. If you want to go this route, then Apple has this page to offer: https://support.apple.com/en-us/HT201372
. Or you can Google it and find other was to do it if you do not want to use the Terminal.
Once you get the macOS installed on the new drive, you will then want to use Migration Assistant to transfer over your applications (something that you cannot do with traditional Windows applications), files and settings. This page should help with that: https://support.apple.com/en-us/HT204350
. Note that these instructions are for if you have the macOS fully setup on the new drive, in which case you then use the Migration Assistant that can be found in the Utilities folder in the Applications folder. It can also be done as part of the setup of the macOS when you first boot up the Mac with the new drive with macOS installed on it. As part of that setup process, it will ask if you want to transfer over files from your "old Mac" (technically in this case, your old drive). And this is where the external enclosure will come in handy again. You can have the old drive in the enclosure and attached as an external drive, which then can be used as part of the Migration Assistant process. And also note that if you do not want to transfer all your applications or files, you will have some ability to pick which ones to transfer over.