Of course, in modern cars, there are battery charge indicators (in the same panel as the speedometer, fuel gauge and temperature gauge). Using these indicators, you can be able to know when your battery is developing problems, like when it is losing charge too quick, even without opening your car's bonnet. Naturally, these indicators only work for as long as the battery is at least 'basically functioning;' for it is the very same battery that powers them.
With other electrically powered features, the cause (and the fix) may not be so simple. Because of that, if any electric accessory stops working it's a good idea to first check whether a fuse that protects the circuit it's on has blown. The owners manual should show where a fuse for a particular feature is located (usually in a side panel below the dashboard near the driver's seat or under the hood). If you're handy with a multimeter that measures voltage, resistance and other things, you may be able to diagnose some of your own electrical problems. However, because they can be difficult for professionals to find and fix, they might be even harder for amateur technicians to solve.
The commonest cause for electrical faults in cars is the 'short circuit' which typically is caused by the so-called 'clashes' in the wiring system. Unless you are professionally qualified in the field of auto vehicle wiring (or mechantronics), you are advised against attempting to carry out auto electrical repairs on faults emanating from 'short circuits.' Getting things wrong here could, in the worst case scenario, see your car up in fire!
If the car's dashboard battery light comes on, you might be able to make it home or to a service facility for a repair. The car will continue running as long as some juice is left in the battery, but if the charging system isn't working or you have a bad alternator, your car's engine will stop running once the battery is drained. If you turn off the engine, you won't be able to restart it if the battery doesn't have enough charge left to power the engine's starter motor.