The alternator helps power all the electrical system of the car. After the batteries helps start the engine, the alternator takes over by producing electrical power to charge the battery and help power the cars electrical needs. As the engine runs it help move the the belt that is connected to the alternator, so it can produce energy.
To ensure the alternator is working well you can checking the belt connected to and ensure it is tight. Another way to ensure your alternator is doing its job is to check the wire connections to the alternator and the car battery. This will help you know if the connections are good.
The alternator needs to be replaced if it no longer charges the battery or stops working. If you use a multimeter you can check the health (see video) of the alternator yourself.