The earliest oil wells in modern times were drilled percussively, by repeatedly raising and dropping a cable tool into the earth. In the 20th Century cable tools were largely replaced with rotary drilling, which could drill boreholes to much greater depths and in less time. The record-depth Kola Borehole used non-rotary mud motor drilling to achieve a depth of over 12,000 metres (39,000 ft).
Until the 1970s, most oil wells were vertical, although lithological and mechanical imperfections cause most wells to deviate at least slightly from true vertical. However, modern directional drilling technologies allow for strongly deviated wells which can, given sufficient depth and with the proper tools, actually become horizontal. This is of great value as the reservoir rocks which contain hydrocarbons are usually horizontal, or sub-horizontal; a horizontal wellbore placed in a production zone has more surface area in the production zone than a vertical well, resulting in a higher production rate. The use of deviated and horizontal drilling has also made it possible to reach reservoirs several kilometers or miles away from the drilling location (extended reach drilling), allowing for the production of hydrocarbons located below locations that are either difficult to place a drilling rig on, environmentally sensitive, or populated.