Presumably, the computer meets the minimum requirements for Windows xp?
Formatting the drive (usually C

before installation will result in loss of all information currently on the drive.
You need to back-up any data you want to keep (my documents, pictures, music, etc.). Assuming you have a lot of data, you'll need to back-up to a CDRom or a whole lot of floppies. Alternatively, you can back-up to another drive or partition, however you refer to D: as the CD Drive, so I assume you don't have another drive available?
Does your friend have the original driver disks for the hardware (GFX Card, sound Card, etc.)?
You should really have these handy during the installation. If you don't have them, you may find that a particular device cannot be installed, though this may not stop the installation from finishing and you can install the drivers installation, if you get them later.