Oil is lighter than water, which means that if you combine the two, the oil will float. By the same token, if you try to put out an oil fire with water, the burning oil will merely float on top of the water and spread.
Throwing sand, table salt, or baking soda on the flames are recommended methods of putting out an oil fire. Alternatively, a damp towel (with all water wrung out) spread over the fire, will cool and smother the flames.
Source: Rosenfeld, Sam. Science Experiments with Water, pp. 53-54.