First thing I would do here is make sure your systems firmware is upto date. Follow this Apple T/N: About EFI and SMC firmware updates for Intel-based Mac computers. You might have something still newer depending on your OS version.
- Hint: the last digits (after the last dot) are hexadecimal so you'll need to convert it to decimal to know if your systems version is newer or older than the T/N. Mavericks and newer OS's have firmware updaters within the OS installer.
You'll need to get a SATA to USB adapter so you can connect your SSD externally to your system. Here's one unit: Startech 2.5" SATA to USB adapter for 2.5" drives.
With the SSD plugged in to your system you'll need to run Disk Utility to partition the drive with GUID and format it with Mac OS Extended (Journaled) partition.
The next step is to download from the Apps Store the OS installer.
Run the installer selecting the SSD drive it will install a fresh OS onto your SSD. Once done you'll want to double check if it's working correctly. Restart the system and press the Option key so you can select the SSD as the boot up drive. If the system starts up you can then shut down the system and swap over the drives. Follow this IFIXIT guide: MacBook Pro 13" Unibody Mid 2012 Hard Drive Replacement.