Your laptop computer can use power from either a battery or an external power source. When it's using the battery, Windows and the proprietary software supplied with the computer monitor the state of the battery's charge and issue a series of alarms when it reaches critical levels.
The Li-Ion battery used by just about every new laptop has a useful life of about two to three years or less, depending on the number of times you recharge it. When you shop for a replacement, look for a fresh battery with as many milliamp hours (MaH) as possible.
When the computer is connected to external power, the battery recharges, whether the computer is turned on or not. If you buy a second AC power unit, either as a replacement or a spare, be sure it provides the same voltage and at least the same amount of power (in watts) as the one supplied or recommended by the computer manufacturer.
In order to expend the amount of time between recharges, reduce the amount of power that the computer consumes; disconnect or remove all unnecessary peripherals and accessories. Also, use the Windows Power Schemes and proprietary energy-saving programs to shut down the disk drive, and monitor screen and other internal components when they're not in use.