For a fire to occur, the following combination of elements need to exist:
Mix: Although Heat, Fuel and Oxygen are the basic elements, how they are mixed (called the MIX) will determine if fire can be started. Wood stored in a heated building, where normal breathing air is present, represent all elements for a fire, however their presence alone does not start a fire.
If you can eliminate any one of the three elements of the fire triangle, the MIX of the elements is changed and the fire will go out. Eliminating one or more of them is what makes a fire extinguisher put out fires.