A laptop can be operated normally without its battery by plugging it into an electric outlet via its AC adapter. Many computer users use their laptops this way as replacements to desktop computers.
Given that constant charging shortens its life faster, the battery should be removed whenever a laptop is kept plugged in for a long time. When removing and putting away the battery for storage, charge it at around 40 percent of its capacity, and place it in a cool location. Use and recharge it at least once a month to keep it in good condition. Removing the battery is also recommended when putting the laptop itself into storage.