Your desktop computer is always "alive." Even when the power is off, the computer is still conscious. A tiny clock battery supplies a trickle of power to the main brain of the processor all the time. This trickle of power provides enough energy to allow for the booting of the BIOS and the start of your normal computer routines. Occasionally this clock battery may need to be replaced.
Turn off your computer and unplug all the cables in the back of the tower, including the main power cord, the video monitor cable, sound speaker cables, and the keyboard and mouse.
Ground yourself if you are standing on a carpeted floor. Touch a piece of bare metal to discharge any static electricity in your body. This is especially important during the winter or if you have long hair, when static is especially troublesome.
Open your desktop chassis case and set it aside.
Look for the nickel-sized silver clock battery located somewhere on the motherboard. If you must move cables out of the way, do so carefully. Try not to touch the motherboard or disturb any cable connections.
Locate the tiny spring gate that holds the clock battery in place. Take a small probe, such as a jeweller's flat head screwdriver, and depress the spring trigger. Be extremely careful not to let this probe slip and scratch the motherboard. Scratching a motherboard with a metal tool will destroy it completely. The clock battery should pop out of the holder without much pressure applied to the spring gate. You may have to help the battery out of the holder. Do this by placing a fingernail under the edge of the clock battery until it pops out of the holder.
Acquire a matching replacement battery. Clock batteries are available at computer parts and repair stores. Good used batteries are acceptable, though new batteries are better. Clock batteries have a very long lifespan, so batteries from used computers are often still very serviceable. Just make sure the size and voltage is identical to the battery you removed from your machine.
Insert the new battery into the holder. The inscribed or very shiny side of the battery should be facing you. Make sure the battery is seated in the holder securely. With the spring gate closed, you should NOT be able to pop the battery out of the holder with your finger.
Replace the chassis cover. Plug in all the external cable connections. Reboot the computer.
Reset any BIOS settings, such as date and time, as instructed by the BIOS start-up screen. Changing a clock battery often resets the BIOS on the motherboard back to its factory "date of birth." Update this date and time; your computer will not run correctly without an accurate date and time setting. Save and exit the Bios and reboot the machine.
Dispose of the old battery responsibly. Clock batteries are so small they do not present much of a biohazard, but responsible disposal is still a good idea.