It was probably developed for decorative or functional purposes in the high Middle Ages. Surfaces like shields - both those used in tournaments and those hung as decorations - were more durable when painted in oil-based media than when painted in the traditional tempera paints. Many Renaissance sources credit northern European painters of the 15th century with the 'invention' of painting with oil media on wood panel - Jan van Eyck often mentioned as the "inventor".
Recent advances in chemistry have produced modern oil paints that can be used with, and cleaned up in, water. These are still 'real' oil-paints in every sense of the meaning. Small alterations in the molecular structure of the oil creates this water miscible property.
A still-newer type of paint, heat-set oils, remain liquid until heated to 265-280 °F (130-138 °C) for about 15 minutes. Since the paint never dries otherwise, cleanup is not needed (except when one wants to use a different color and the same brush). Although not technically true oils (the medium is an unidentified "non-drying synthetic oily liquid, imbedded with a heat sensitive curing agent"), the paintings resemble oil paintings and are usually shown as oil paintings.