The CMOS battery is supposed to last at least five years, but many have failed more quickly. When the battery begins to fail the CMOS might lose its charge, so the BIOS can produce unreliable configuration settings. Therefore, it's a good idea to replace the battery after two or three years, but almost nobody remembers to do it until their computer begins to show the wrong date or it has other flaky settings.
To replace the battery, follow the instructions for clearing the CMOS, but install a new battery in place of the old one.
When you're ready to replace the battery, remove the old one and take it with you to the store. Make sure the new one is the same type or part number as the old one. If you can't read the number on the old battery, consult the motherboard manual.