A short or fault in the Alternators Winding or rotor field can cause an alternator to either not charge the battery or could also overcharge the battery and when a battery gets overcharged it can actually kill the battery.
A loose belt could also cause your alternator to not spin fast enough which can prevent the alternator from putting out enough voltage that is required to keep your battery charged.
Bad bearings in an alternator can also cause charging problems or even the diode not closing like it should.