There is a small battery on the motherboard that keeps the CMOS alive.
This is "non-volital" memory that remembers all the setup info. The battery is what makes it non-volital.
Just as all batteries do, these motherboard batteries eventually die.
Changing it can range from super easy to being a pain and involve soldering.