A: The warninglight (ammeter) is actually a voltmeter. When the light is off then the system voltage equals the alternator voltage. When the light is on, the system voltage equals battery voltage and the alternator is not supplying power.
What has happened?
The alternator has quit producing a charge or is not functioning or has an overload and/or battery is not receiving it's charge.
What do YOU do?
First follow the POH (your airplane's Pilot's Operating Handbook) procedure
It may look like the following :
Check Master and Alternator circuit breaker and reset once if popped.
If that did not correct the problem then,
Turn Alternator off ( left half of the Master switch marked Alternator) and pull the circuit breaker. Items will continue to draw power from battery, everything electrical will work, until battery runs out. The next step is important considering that.
All Electrical equipment not essential to flight should be turned off. (To review... battery only source of electrical power now and is draining....tick tock)
Flight should be terminated and landing made as soon as possible, if radios are necessary i.e., Instrument flight. If your radios are working then transmit when able of your situation and be prepared to land in VFR conditions receiving light gun signals from the Tower.
http://www.beverlyflightcenter.com/docs_downloads/LightGunSignalCard.pdf
OK back to alternators. Alternators are capable of producing full rated output at low engine rpm. The strength of the magnetic field in alternators is automatically adjusted by an excitement power from the voltage regulator. Alternators (vs old Generators) don't have permanent magnets so when the aircraft battery is completely discharged, the alternator will not charge.
When the alternator charged system has a healthey battery and resistance-free connectinos, the voltage regulator senses the aircraft electrical system voltage and varies the excitement current flow to maintain a charging system