Updated September 28, 2020
Are you running out of free space on your computer's hard drive? You've uninstalled unused programs and cleaned it up, but still cannot free up any more room? Doing computer repair, I've seen this often and have personally run out of space more times than I care to remember. Here's how to upgrade the hard drive in your computer.
Changing out a hard drive may sound scary, but it's not. If your existing drive is healthy and you have a good backup of the data on it, you should be good to go. The procedure is the same for desktop computers and laptops, with slight differences due to the form factor (physical size).

Two different sizes of hard drives side-by-side
There are two types of drives, SSD (Solid State Drive) and HDD (Hard Disk Drive), two different types of hard drive interfaces, SATA (7 pin connection cable) and PATA (40 pin ribbon connection cable), and two different form factors (physical size) of drives; 2.5" and 3.5" (the dimension relates to the width of the drive). HHD's come in 3.5" and 2.5" sizes; SSD's come in only the 2.5" form factor. Laptops use the 2.5" form factor, and desktop computers can use either size. If you're planning on using an SSD or 2.5" HDD in a desktop computer, you'll have to use 2.5" to 3.5" adapter brackets. Also, if you're installing an SSD into a laptop, check the physical dimensions first. Some SSD's are higher (thicker) than standard 2.5" HDD's and may not fit into a laptop.

View of hard drive properties inside of Disk Management
The next thing to do is find out what you have for an existing drive. Open Computer Management, expand the Storage section, and select Disk Management. Find the disk you want to upgrade, right-click on the disk name (Disk 0, Disk 1, etc.) and select Properties. On the General tab, you will find the model number of that drive. Do a Google search for it and find out the specifications (form factor, data capacity, and interface). Now it's just a matter of getting a new drive that matches the form factor and interface. Remember that your new drive's data capacity has to be equal to or larger than your existing drive.
If your existing drive is an HDD, the first thing to do is to check the current drive for errors. Running a Checkdisk will find any errors that might prevent the successful cloning of the drive.
Running Checkdisk in Windows 7 / Windows Vista
Running Checkdisk in Windows 8
Running Checkdisk in Windows 10
If errors are found on the existing drive, you may not be able to use the new drive's manufacturer's software. In this case, you will have to use third-party software like R-Drive that can ignore read errors.
Two ways to clone a hard drive
Drive-to-drive cloning
Drive-to-drive is the easiest to do, and a few drive manufacturers (Western Digital, Seagate, etc.) have free utilities to do this. There are also a few free disk cloning utilities out there. Check out the UBCD; it has a few. All you have to do is turn off your computer and install the new drive into your computer. If your system is a desktop computer, consult the manufacturer's documentation on how to do this. If it's a laptop, you will have to attach it using either a USB adapter or inside of an external case.

A laptop hard drive connected to a USB adapter
If you plan on reusing your existing laptop drive, an external case might be the way to go. That way, when you're done, you can put your current drive into it, reformat it and use it as an external drive for storage.
Once you have the new drive in place, start your computer up, install the manufacturer's software and start the disk clone. If you're installing a larger drive, always remember to check and make sure that the new free space is going to partition you want to expand. Once done, just power off the computer and change the drives out. If your system is a laptop, consult the manufacturer's documentation on how to change out the hard drive. If you installed an HDD, the first thing you want to do is a Checkdisk. When you clone a drive, you copy everything, including the MFT (Master File Table). SSD's will automatically adjust them, HDD's don't. Run a Checkdisk to fix them.
Drive-to-image / image-to-drive cloning
Drive-to-image / image-to-drive are a bit harder to do, but it has an advantage, a full disk backup. This process does require third-party software like R-Drive and an external drive or network drive. Most disk cloning tools allow you to create a boot disk; that way, you can boot your system up on it to clone the drive. Once you have made a boot disk, you're ready to go.
The process is the same as drive-to-drive, but instead of cloning to the new drive, you create a file containing an image of the existing hard drive on a removable hard drive or network folder. I prefer the portable (2.5") external hard drive, as they don't require any additional source of power (AC adapter). Boot your computer up on the disk you created. Once it is booted up, attach an external hard drive or configure the network settings and select your drive image location.
After you create the drive image, you can shut down your computer and change out the drives. Consult the manufacturer's documentation on how to change out the hard drive. Then you boot your computer back up on the disk you created, reconnect your external drive or network drive, and restore the drive from the image file. If you're installing a larger drive, always remember to check and make sure that the new free space is going to partition you want to expand. Once done, just shut the system down, remove the boot disk and start it back up. If you installed an HDD, the first thing you want to do is a Checkdisk. When you clone a drive, you copy everything, including the Master File Table. SSD's will automatically adjust them, HDD's don't. Run a checkdisk to fix them.
For more information on upgrading computer drives. click on the following links.
How to clone the drive in your Windows computer
How to upgrade your computers hard disk drive to a solid state drive