04-04-2017 12:31 AM
You should provide the exact model of your PC to get more specific help.
Anyway, you will need a 3.5" Sata hard drive to replace the broken one or a 2.5" SSD with 3.5" bracket. Here is a link to service guide (maybe a different model) to give idea of how it is done. (page 10)
You will need to reinstall the OS. If you have the HP recovery disks or drive you can do it with them. If not, you can download the media creation tool from Microsoft for either windows 10 or windows 8.1 and run to create a bootable drive to install windows again. The OS will be automatically activated as long as you install the same edition and version which was already installed on PC.
Let me know for further help,