25kg CO2 fire extinguisher is primarily used to extinguish Class B and E fires, which involve flammable liquids and electrical equipment, respectively. It works by releasing carbon dioxide gas, which displaces oxygen and smothers the fire, as described in the Testbook article.