The following is an excerpt from the Complete Guide to Laboratory Safety, Third Edition, by Terry Jo Gile. To purchase this book, click here. 
According to the National Fire Protection Association’s NFPA 10, fires are classified into five types based on the material burning. Different types of extinguishers are used for different types of fires:
Class A fires involve ordinary solid combustible materials such as paper, wood, or cloth. Extinguish Class A fires with water or an all-purpose dry chemical extinguisher. Class A fires may smolder for a long time, so it is important to drown them thoroughly.
Class B fires involve flammable liquids, such as chemicals or grease. Use a carbon dioxide or ABC extinguisher for Class B fires. Never use water, which may spread the fire further without doing anything to put it out.
Class C fires involve electricity. Use a carbon dioxide or ABC extinguisher for Class C fires, and turn off the power supply if possible. Never use water or electrical fires—water conducts electricity. In an electrical fire, never touch the burning object—even if it is as person.
Class D involves metals, such as aluminum and magnesium. Sand is the best method for extinguishing this type of fire. Never use water, as it may cause a violent reaction. Class D fires are usually not found in laboratories but rather in manufacturing, where large amounts of metals are used.
Class K fires are found in commercial kitchens where improved cooking appliances, higher heating rates, and use of unsaturated oils are evident. Class K fires are not found in laboratories but rather in commercial kitchens, such as restaurants.