The CMOS battery powers the Complementary metal-oxide-semiconductor. CMOS is the small amount of memory on a motherboard that ensures that the BIOS, or Basic Input-Output System, does not lose all of its data every time the computer turns off.
Information such as boot order, time, date and other functions would have to be reset every time the computer started up without this battery. The information changed on what is commonly referred to as the BIOS setup is actually changing data on the CMOS, and the battery's function is to stay on constantly in order to keep the information stored. On most motherboards, the CMOS battery is attached directly, but on some more compact devices, such as laptops or tablets, the battery is in a separate compartment and connected to the motherboard via two wires.
The CMOS battery is often a CR2032 cell and lasts for years, depending on how many times the computer is turned on and off in its lifespan. Once the battery dies, it can be replaced, but all of the data on the CMOS is lost. Removing the CMOS battery can be one troubleshooting step in fixing certain hardware problems or if the user forgot her BIOS password.