Car batteries store electricity by a chemical reaction. There are a set of lead plates inside that are in a bath of sulphuric acid. When in use, the water in the acid can evaporate (although most modern batteries are sealed and need no topping up) and have to be topped up with water. For this reason you should take care not to overfill a battery as leaking acid is bad news.
Distilled water is recommended because tap water often contains other things like calcium that would damage the battery.
https://en.wikipedia.org/wiki/Automotive_battery