Hi there
For a laptop it's straight forward -- simply connect the NEW HDD to the laptop via a USB==>Sata connector and use any imaging program to copy the disk.
(Even easier -- if you can handle Linux boot any Live Distro from USB / CD and simply type in
SUDO dd if=/dev/sda of=/output device (target) bs=16384K conv=noerror,notrunc
Go away have a beer, glass of whisky, or whatever -- takes a little while - but it copies the entire drive including MBR etc.
Simply now fit the new drive and boot.
If it's a new INTERNAL HDD and you only have ONE HDD it's a bit more complex if you can't connect the drive externally.
You have several methods here --depending on whether you can connect BOTH HDD's to the computer at the same time.
Fit 2nd Disk and copy either with something like CLONEZILLA or use the Linux Live distro with the DD command -- to see what the devices are simply type SUDO fdisk -l on the Linux console (command line).
After the copy disconnect Bad disk and you should be fine to boot etc. In the event of boot NOT working simply insert windows install disk / recovery disk and go for repair system. That should fix boot errors (but the DD method seems to be the most reliable method even if it isn't the fastest).
Clonezilla is another good freebie for copying disks.
Clonezilla - About
For Linux distros use any Live CD - Linux mint is probably the easiest and will work straight out of the box
Main Page - Linux Mint
For a USB==>sata cable get something like this. (Pic shown).
(note if you re-partition the new disk you can keep the OS separate from Data etc -- always a good idea. For re-partitioning GPARTED is a good system -- you can either download a bootable stand alone version or again using the Linux Live CD simply type SUDO gparted and you've got a nice graphical partition manager that can adjust partitions etc. The Linux DD command can also copy partitions -- instead of say dd if=/dev/sda choose say dd if=/dev/sda1 or whatever the partition number is (use fdisk -l to list the disks / partitions).
the DD command and clonezilla need the TARGET disk / partitions to be at least the same size as the source - however you can re-size afterwards. I wouldn't re-partition your source HDD if you suspect it's going bad - get it copied first. If you have an external USB then image it to that before starting. Then if it goes wrong we can recover easily.
Cheers
jimbo