Most retail hard drives come with a bootable CD that can "clone" the old
drive to the new one. This assumes that the PC has at least two disk
connectors of the same type (e.g., both IDE/ATA or both SATA). The new hard
drive must be of the same type as the old one, since cloning will not handle
a conversion from IDE/ATA to SATA, which usually requires a "repair" of XP.
(IDE/ATA uses is wide "ribbon" cable with 40 to 80 wires; SATA uses a much
thinner cable with fewer wires.)
If you already bought the hard drive, and it did not come with a CD of
tools, go to the hard drive maker's support site and look for a downloadable
version of the tools. For example, for a new Seagate drives, use their
DiskWizard to prepare the hard drive and clone the old one to the new one.
See
http://www.seagate.com/support/discwizard/dw_ug.en.pdf for a sample of
the concepts involved. Note that some tools will only work if they detect
at least one hard drive their disk maker. Others may work on all hard
drives.
Alternatively, get some cloning software and do the same thing yourself. I
would use Acronis TrueImage, run from a bootable CD. Norton GHOST is
another possibility. Other options, some free, are available at this link:
http://www.majorgeeks.com/downloads3.html Be sure to look for software
that support "cloning", not just imaging. Or, try a Google search for "hard
drive clone", without the quotes.
WARNING: Be sure to clone from the old ot the new. If you do the reverse
you may end up with two blank hard drives !
A safer way of transferring data would be to write a disk image (not clone)
to a temporary location, like an external USB disk. Then, remove old drive,
install new, (maybe prepare the new hard drive; depends on the software),
and then restore the image from external to internal. Both TrueImage and
GHOST can do this. If anything goes wrong, simply reinstall the old hard
drive, and the PC should at least be as good as before.
If you are not commfortable playing with disk preparation and cloning
software, a safe thing to do would be to sub-contract the hard drive
replacement and cloning to the service department of a major PC store. If
you also buy the new hard drive at the same store, they may install/clone
for a lower price. If not, the fee is usually modest. (See for example any
local CompUSA or Circuit City store.)