Hard drives, floppy drives and CD-ROMs use a ribbon cable (a flat, wide and typically gray colored cable). If you have two IDE cables, these need to be identified as 'primary' and 'secondary' for proper reconnection later. This information will be in the manual and may be silk-screened on the PCB itself. You also need to identify pin 1 on the cable, which is the red or blue edge of the cable. If it is connected backwards, you can damage the drive or ruin floppy disks.
The front panel wires usually have a flat plastic connector with the associated light or switch name on it (i.e., Reset, Power LED, HDD LED, Speaker, etc.). If this is not the case you will need to follow each one back to its origin and mark or note what each one is. Your CD-ROM may also have a wire that connects to the sound card to allow sound CDs to play through the speakers.
First, you will need to remove all the expansion cards. Remove the screw that holds each card in place and pull upward to remove the card from its socket. If the card is difficult to remove, you can try gently prying with a blade screwdriver under the top of the bracket where the screw hole is to get things started.
With most cases, you should now be able to remove the motherboard. Some small desktop cases, however, may require that additional items be removed such as the drive bays. If necessary, remove the necessary items and make a note of how they need to be re-installed. If your case has a slide out or removable motherboard rack this will make it much easier to remove the motherboard without risking your knuckles.
There will be at least one screw holding the motherboard securely to the case. Be sure to locate and remove them all. The screws holding the motherboard in place are attached to the brass standoffs, which are in turn are screwed into the bottom of the case or motherboard rack. There are also nylon standoffs that are pushed up through the small holes in the motherboard and attach to the case by sliding into a slot. The nylon standoffs are usually best removed after the motherboard is out of the case.
With the screws removed, you should be able to slide the motherboard to one side, and then lift it up out of the case. If this is difficult due to limited space, look at the underside of the case and determine which standoffs may be hanging up in the slot. This is where having a removable motherboard rack really makes the job much easier.
Extract the nylon standoffs by pinching the tabs on top with needle-nosed pliers and pulling them down through the bottom of the motherboard. You will need to reuse these on the new motherboard, so be sure to put them in a safe place, along with the screws you removed. You may also want to remove your memory for use on the new motherboard.