Fires are classified based on their fuel into Class A, B, and D. Class A fires involve solid organic materials like wood and paper. Class B fires involve flammable liquids. Different types of extinguishers like water, dry chemical powder, foam, and carbon dioxide can be used to extinguish different classes of fire. Foam extinguishers work on both Class A and B fires by creating an air foam blanket that cuts off oxygen and prevents vapors from fuels.