If you have a volt/ohm meter you can check the voltage at the battery when the car is running. The alternator (voltage regulator) should be putting out about 14.3 volts. If you check the battery voltage with the car not running even a weak battery could show close to 12 volts because there is no draw on it. Like already suggested it could be a loose belt on the alternator, or a weak battery. You can get the battery checked at a auto parts store like Autozone. They can put a load on it and tell you if it's OK.