Once the well has been drilled to depth, the company tests it to determine whether there is enough oil or gas to merit putting the well on production. If so, the well must first be "completed," or prepared for production.
Tubular steel casing is inserted and cemented into the well to prevent water and rock from sloughing into the wellbore. Specialized production tubing is then lowered down the casing; this tubing is connected to the wellhead, a device located at the surface used to control production flow.
In most cases, the producing formation must be stimulated to help the oil or gas flow more easily into the wellbore. This is usually done by perforating the pay zone or injecting acids and other chemicals to fracture the rock - a process known as "fracing."