For most AA batteries, ‘exploding’ usually means a loud ‘pop’ sound and ejection of corrosive materials. When alkaline, NiMH and even lithium AA batteries rupture, the force and heat of the explosion isn’t anywhere near that of, say, an explosive li-ion failure - although it’s still potentially hazardous to users, and the causes should be investigated when safe to do so, along with contacting the manufacturer or supplier.
If you’re ever faced with a badly leaking, ruptured or exploded alkaline AA battery, the best procedure is to immediately and carefully wash all traces of ejected material off your skin. Once this has been done, any traces of this remaining lye material should be neutralised with a household acid such as vinegar or lemon juice - but only do so after removing as much material as possible with water, otherwise, an exothermic chemical reaction can occur, generating more heat.
If any material has made direct contact with your eyes, wash them thoroughly and seek medical advice. Once you’ve taken care of yourself, it’s important to clean any leaked material off components and contacts in the battery enclosure, as it can damage devices irreparably if left to degrade the metals. Again, vinegar or lemon juice on a cotton bud will be effective here, as will careful scraping with a flat screwdriver for any stubborn residue.