The car should recharge your battery each time you drive your car to keep the performance of the battery good. Usually the charging system charges the battery automatically and it works all the time. However, sometime various electrical problems incur which drain out the battery and halts the normal working of the car.
Starting your car is the main aim of your battery, as it generates large volts of current for a short span of time. Frequent attempts to start your engine can fully drain out the battery quickly.
When you run accessories in your car with engine powered off, the electricity is totally provided by the battery. Playing stereo or lights switched on for few hours consume the battery and discharge it, with no power left to start the engine.
The charging system should be free of defects as a defective system either will exhaust the battery, or will not let it recharge. There are some problems such as alternator issue, the diodes, the voltage controller, or dispatch. To recharge the battery, these problems can weaken the system.
In summers, if the car has not been used much for several days, it drops its battery charge. The clocks and other electronic equipment also drain out the battery during this time.