The CMOS battery does not store data. The CMOS battery ensures that the CMOS chip, which does store data, has power. CMOS memory requires power to retain data, so the battery is necessary when no external power is supplied to the computer.
This is why a jumper is usually removed from the motherboard to reset the CMOS, as doing so interrupts power to the CMOS chip long enough to clear the data.
A sign of impending CMOS battery failure is when the computer's real-time clock begins to lose track of time when the system is off and not powered by another power source.
On many newer computers, the BIOS configuration data is stored in flash memory, and the battery serves solely to maintain the real-time clock. In such systems, it is called the "RTC battery" (an example is on page 29 of the HP Pavilion dv6z-3000 Select Edition service manual). RTC battery failure in such systems will cause the clock to lose track of time when the system is disconnected from power, but will not result in loss of BIOS settings.