Cable Tools
The first mechanical drilling for oil used a technology called cable tool drilling, in which a heavy bit is dropped repeatedly on the same spot to essentially chop a hole in the earth. The bit is attached to a cable, which raises it after each drop. The bit is regularly removed, and the broken pieces scooped or "bailed" from the hole. Only very shallow wells are still drilled with this technology.
Rotary Tools
A rotary drill rig uses a large engine at the surface to turn a bit on the other end of a string of heavy steel pipe called the drill string. A rotary bit has many teeth to scrape small chips, or "cuttings" from the earth, which are removed from the wellbore by the circulation of drilling fluids. Since drilling continues even as the debris is removed from the hole, rotary drilling allows for exploration using much deeper wells.
Drilling Mud
Drilling fluids, usually called "mud," serve several purposes in a rotary drilling operation. Mud is in constant circulation within the well. As mud is pumped into the drill string at the top and out through holes in the bits, the mud in the hole already overflows and runs out the top of the well, where it is captured and reused. The mud lubricates the long string of drill pipe, carries cuttings back to the surface, and helps prevent the open wellbore from collapsing.
Completion
If oil or gas is encountered in quantities sufficient to pay for the infrastructure to lift it to the surface, a well is completed. Completion involves the lining of the wellbore with steel casing to prevent its collapse, isolation of the productive zone, and installation of any pumps and tubing to raise the hydrocarbons to the surface.