It could be that your battery is not getting charged by the alternator, which would be either a dead battery, a bad alternator, or a wiring issue. I'd get it checked at an actual automotive electical specialist, not at an auto parts store or a Wal-Mart-ish place.
-or-
Try jump starting the battery and letting it run for awhile (15-20 mins). Turn the car off then see if it starts. Did you buy the alternator new or get it at a junk yard? If new then it's probably the battery, which you can easily replace. If the alternator was bought second hand go get another one. If that doen't work then try the new battery thing. If neither of these things work, then you might consider taking it to a repair shop. If you need a specialist they will tell you, but chances are they can fix whatever problem you're having.
u might need a new starter
The computer only resets when the battery is removed. The alternator just charges the battery, so if the battery is left connected when the alternator is replaced, the computer should not reset.
2002 Mazda tribute, what is cylinder misfire My #5 cylinder has a misfire. Battery light also flickers according to idle. So far not alternator. Alternator and battery was replaced maybe 2 years ago.
the battery is dead and needs to be charged or replaced, or it could also be the alternator is going bad
Battery light usually means alternator not charging. Most common solutions would be be a bad alternator, bad connection, or loose alternator belt. If the battery and alt test ok than check the connections to the alternator and battery.
Alternator
did you check the alternator??
Inside the alternator
Voltage regulator or loose wire.
Check the battery cables or starter.
Alternator is not charging. Have it tested and/or replaced.
If alternator and battery test fine- then you may have a bad fusable link not allowing the alternator to charge the battery