Nearly all Macintosh computers have a battery on the logic board that provides power to a small amount of memory that retains settings required by your computer for proper startup. That small amount of memory is called Parameter Random Access Memory, or PRAM for short. Some of the settings stored in the PRAM are the current date and time, the settings that allow your Mac to communicate with its monitor, and the current startup disk.
The battery lasts an average of five years, depending on usage, but when it finally runs out of power, your first clue will be that each time your Mac starts up, the date and time will be wrong.
At that point it’s time to replace the PRAM battery. Once the battery is replaced, the Mac will retain the correct date and time and all necessary settings.
Desktop Macs typically use a 3.6 volt lithium battery that looks like this:
It’s as thick and about half as tall as a standard AA battery. (It’s called a 1/2 AA 3.6V lithium battery). Those batteries are available at Radio Shack, Batteries Plus, and online.
Some newer Mac models use CR2032 button cells, available at Radio Shack, Best Buy, and even Walmart. It looks like this:
Some older Mac desktop models use a 4.5 volt battery pack that looks like this: