Changing from HDD to SSD
There are a variety of ways you can do this. I'll cover the two cleanest ways here.

Restoring the disk from the source or image

This will require that you have simultaneous access to at least two disks.


If you can't access the HDD and SSD simultaneously, Image the HDD to another disk you can access via Disk Utility.


Boot via Internet Recovery (recommended) or an external bootable volume/installer.
Select your HDD in Disk Utility.
Click "Image" in the menu bar (if it's not there, add it by right clicking and dragging it in.)
Save your image to an external volume.

Install the SSD.
Boot via Internet Recovery (recommended) or an external bootable volume/installer.
Open Disk Utility.
Restore the SSD from the HDD or image of the HDD.


Select your SSD in the sidebar of Disk Utility.
Click "Restore" in the menu bar (if it's not there, add it by right clicking and dragging it in).
Select the proper volume/image.
Restore



Using Migration Assistant

This will require you have simultaneous access to the two disks from two separate Macs or a Time Machine backup of your HDD.

Follow the instructions from here.