If it’s a SATA HDD, then yes, although if its a PC rather than a laptop, you will most likely need a 3.5 inch to 2.5 converter bracket to mount the SSD in the PC. Check your case, and see if it has a 2.5 inch mounting solution. Most modern PC cases do have an SSD mount (2.5 inch).
If its a single drive laptop, then it’s a simple matter of removing the HDD and installing the SSD.
Before installing Windows on the SSD, then make sure SATA is set to AHCI mode rather than IDE.