In the case of a Laptop, there are two types of battery :
In case of Computer, there are two sources of power :
CMOS Battery is a coin shaped battery fixed inside the Motherboard, this battery continuously gives a small amount of power to the motherboard of your computer and thus helps to maintain BIOS (Basic Input Output System) and time even after shutting down your computer or remove the power plug from main electric supply.
BIOS is that System which is already installed in your computer or laptop and can't be changed. You can't replace BIOS of your computer with any other system in any way. However you can change your Operating System to Windows Vista, Windows XP, Windows 7, Windows 10, Linux or any other. But you can't change BIOS.
Suppose there is no BIOS in a computer or a laptop. In this situation, there is not any system present to give command to the operating system, means the system can't be booted at all.
If you continuously keep your computer shut down for about 10 to 12 years, then the CMOS Battery gets damaged or run out of life. In this case, there are several problems which you have to face like….
Explaining about ON position, when the computer or laptop is connected to Internet through any means, it manages to maintain the time through online servers.
In this way a computer or laptop always maintain accurate time either you shut it down or keep using.
If you still have any doubts, you can comment your questions. I'll clarify your doubts.