Car batteries have problems in cold weather, too. A battery is essentially a can full of chemicals that produce electrons.
The chemical reactions inside of batteries take place more slowly when the car battery is cold, so the battery produces fewer electrons. The car’s starter motor therefore has less energy to work with when it tries to start the engine, and this causes the engine to crank slowly.
All three of these problems can trick you into thinking you have a dead battery and make it impossible to start an engine in really cold weather.
To get around this, people either keep their cars in heated garages or use something like a “battery blanket” or “block heater.” A block heater is a little electric heater that you plug into the wall to keep the engine warm.