Most motherboards have a battery that you can change. Depending on the motherboard and how old it is it may be in several different forms. The older systems had batteries that were a black rectangluar thing with wires that ran to the motherboard and plugged into a connector on the motherboard. Also, a few systems had rechargeable batteries that were mounted on the motherboard. Most newer systems use a small coin shaped Lithium battery that you'll immediately recongize and can be changed relatively easily. There were a few older systems (mostly 486 and early pentiums) that used a Dallas realtime clock and cmos memory IC that had the battery built into it. Some of these systems also had a connector that you could connnect an external battery to if the battery inside the IC went dead, but some of them didn't. On the ones that didn't in order to replace the battery you'd have to replace that whole IC and on some boards that IC was soldered onto the board. So, on those boards that could be a problem.
The Bios itself resides in a Flash rom on newer systems and an EPROM or one time progammable rom on old systems. Either way the bios itself resides in non-volatile memory and losing the battery won't lose the bios. The Bios settings, or cmos settings, that you set in your bios setup program are, however, stored in this battery backed up memory. So, if the battery fails you lose these and usually the bios will revert to the defualt settings.
What I'd recommend doing is just going into your bios setup program and write down all your currrent settings on a piece of paper. Then power the system down completely and change the battery. Then when you restart your system with the new battery in place you can re-enter your settings. It's usually a good idea to only work on a system with the power completely off. It's safer for you and safer for your computer. Also, you should of course take proper anti-static precautions.