The density of oil is lighter than that of water, so it will flow on water. If you use water to put out fire caused by oil, water will sink into oil thus unable to reach the fire. It cannot put out fire and will spread the area of the fire.
Oil is less dense than water, so oil always floats on water. When you pour water into burning oil, the water sinks under the oil and the oil rises to the surface. If you add too much water, everything spills out, and the fire will be spread.