If you are taking about a desktop computer, then you must be talking about the CMOS battery on your motherboard. If this is getting low or you are experiencing repeated time and date resets, you need to replace it. This battery typically can last 5-10 years when a computer has always been plugged in but considerably less if the computer has spent a lot of time unplugged (it then needs to keep the BIOS memory/settings).

The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Compnet Ventures, LLC hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.