Common Sense: Water does not burn. We can use water to extinguish fire.
Science behind: Most fire is a chemical reaction known as combustion where fuel reacts with oxygen to generate heat. Without sufficient heat, a fire cannot begin. The fuel must reach the ignition point to begin a fire. Without fuel, the fire will stop naturally. Without oxygen, the fire will stop as well. To sustain a fire, all the three components [heat, fuel and oxygen] must be together in a way that the chemical reaction will sustain. Hence it is also known as fire tetrahedron. [image from Wikipedia]
Water can generally be used to stop a fire with solid fuel by cooling the fire so that the fuel does not reach ignition point. Other method of fire fighting includes removing oxygen, e.g. foam to block the fuel from air; or explosion for oil well fire.
Exception: If you have a fire on a pan with oil (ie burning oil) do NOT use water. When water is poured on the boiling and burning oil, water will evaporate, expanding rapidity. This will cause the burning oil to splash increasing the contact area of oil with oxygen. The fire will intensify.
Stupidity: See my previous comment on this.