CMOS (complementary metal-oxide-semiconductor) is a chip which is placed on the motherboard in order to store the system date and time and this is powered by a CMOS battery which is housed inside this chip and is used to manage the date and time when the system is off.
This is a long lasting battery which can work till the life of a motherboard.
This battery is also used to maintain BIOS settings and hardware settings and BIOS uses it during the booting process in order to retrieve the stored information regarding the hardware or system date time.
CMOS chip is basically volatile and cannot retain settings information when the computer system powers off but the CMOS battery helps to maintain these setting just like system time and date when the computer gets shut down.