So you know where the oil is, or where you think it might be, and now you want to get to it - you need to drill a well.
The reservoir could be a hundred feet under the surface (though this is increasingly unlikely these days due to this easy oil being already exploited), or could be 7 miles deep and under a mile of water.
Wells don't just go straight down - they are directionally drilled using a variety of techniques, often drilling horizontally to maximise the amount of oil that can be extracted, or changing direction to avoid obstacles like other wells in the area, or to drill through multiple reservoirs in the one well, or from a single rig or platform location. Several 'extended reach' wells have been drilled with horizontal displacements of over 6 miles.
Regardless of if the well is on land or offshore, or is vertical or deviated, there are a few things that are common to all modern oil drilling:
First, you need something to cut the rock with - a drill bit.
Then you need some way of powering the bit (i.e. to rotate it), and some way of running it into and pulling it out of the hole. This is mainly the job of the drill string - a length of drill pipe (specially designed pipe) which extends from the bit to the surface.
So we have determined that we need:
So you have your drillstring, mud, bit, and all the other things you need. Do you just drill drill drill until you reach your target? Nope - you need to change your mud weight as you drill deeper or else you'll get kicks (which are dangerous) or fracture the formation therefor lose mud.
Formation pressure usually increases with depth - there is more 'overburden' rock on top of it so the compressive force is higher. "What does this have to do with anything?", you might be thinking, "because at depth the hydrostatic pressure of the mud will be increasing too" (think of swimming to the deep end in a pool - as you go under your ears get sore with the pressure, and as you go deeper it gets sorer as the hydrostatic pressure increases - the hydrostatic pressure of a column of fluid is dependant on its density x vertical height).
The problem is that the change in formation pressure with depth is different to the rate at which the mud hydrostatic changes with depth - the formation pressure will usually increase faster, therefore if you don't change the mud weight there'll come a depth where your formation pressure will be higher than your mud hydrostatic - you'll get a kick, or the hole will collapse.
So why not just make the mud weight higher than the largest pore pressure you're going to see in the well? Because of the formation breakdown pressure (or fracture pressure). This is pressure that the formation can take before cracks are induced, and you start losing your drilling fluid. This is not good - you can lose so much mud that:
To be able to change your mud weight to drill deeper, you have to run casing (after you've pulled the drill string out of the hole):
Casing consists of joints of steel pipe about 40ft long which screw together into a casing string. This casing string is a couple of inches smaller in diameter than your hole. It is run across the formation you want to isolate - the bottom of the casing will be a few feet above the bottom of your hole. Then you pump cement down the casing until it goes up between the outside of the casing and the wellbore (you either run pipe down to the bottom of the casing or use wiper plugs to ensure the inside of the casing walls don't get covered in cement). The cement sets the casing in place, and also prevents formation fluids from moving into the area between the casing and the borehole.
Once the cement has set, you run in with a smaller sized drill bit through your casing, and could continue to drill until you either reach your target or have to set more casing.
You'll usually only drill a couple of hundred feet below the surface before you have to set your first casing string - called the conductor - because the formations near the surface aren't subject to as much compression (overburden) as the ones below so they are loose ('unconsolidated'); the shallower-set casing strings also protect groundwater reservoirs (that might be used for drinking water or irrigation) from contamination with oil and mud.Instead of drilling you might pile-drive the conductor (basically hammer it into the rock).
Then after the conductor you'll usually have to set 'surface casing' - casing that doesn't go too deep, upon which you can sit your blowout preventer. You'll usually drill your top hole sections (the holes made prior the BOP is installed) with water, and periodically pump small volumes of high-viscosity mud ('hi-vis') to ensure all the cuttings are cleaned out of the hole.
The blowout preventer (nearly always called a BOP - pronounced 'Bee-Oh-Pee') is another essential piece of equipment. It is attached to the top of the surface casing string. It will have at least three sets of rams which are fixed to pistons. Each set of rams can be activated individually - when the rams are operated, the pistons push the ram closed, sealing in the wellbore.
So... you have a drill bit on the end of your drill string (with drill collars to provide weight to your bit, and measurement/logging while drilling tools to tell you in which direction you're drilling and what the formation is like), and you're pumping mud down the middle of the string and up the annulus to surface. Your formation pressure is increasing, getting closer to your mud weight, so you pull the drill bit to surface, then run and cement casing. Then you make up a bit with a smaller diameter (which will fit inside the casing you?ve just set), and you drill deeper, and repeat the process until you reach your target.
Obviously, you need something to control this equipment and provide the power required. This is the job of the drilling rig and surface equipment.
There are several types of rig, with the one you'll use depending mostly on where you are drilling (on land, in shallow water, deep water), but also to a lesser extent on the type of well you're going to drill (like a shallow well or extended reach).
The basic drilling equipment on each rig type is broadly the same. You need a way to lift the pipe, to rotate it, and pump mud. Up, down, turn, pump.
Lifting the string:
The drillstring is suspended in the derrick. This is the big tower. In it there is a draw works, which is a big cable drum which winds in and out the drill line at the driller's command. The drill line goes up to the top of the derrick to a fixed set of pulleys called the crown block. It then runs down the middle of the derrick to another set of pulleys which can travel - this is called the travelling block. To the travelling block is fixed a big motor called a top drive (if it is a modern system - a system common on older, or more basic, rigs uses a rotary table and kelly).The top drive screws into the drill string. So you reel the drilling line in or out with the draw works, it raises or lowers the travelling block (with the top drive) which raises and lowers the drill string to which it is connected.
Rotating the drill string:
The drill string is connected to the top drive. The top drive has a motor, which turns the string.
Mud is stored in 'mud pits' on the rig - these are just big tanks which have a series of interconnecting pipes and valves to allow each pit to store a different type of mud if required. The mud is sucked from the mud pits to the mud pumps - big pumps, usually 3 of them on each rig - which then direct it to the standpipe manifold.
The standpipe manifold is just a series of interconnected pipes with valves that can be manipulated to control where the mud goes - for normal drilling it will go up the standpipe (a pipe that goes to the top of the derrick). The standpipe will be connected to the top drive via a flexible hose (has to be flexible as the top drive moves as you lift and lower the pipe). It goes through the top drive, down the drillstring and out the bit nozzles, up the annulus, and then at the top of the annulus is the flowline.
The flowline is just a large diameter pipe that is almost perpendicular to the annulus - the mud in the annulus gets to this level, runs down the flowline (which is sloping slightly), and into the header box. The header box is just a big trough that allows the returning mud to be distributed evenly between the shakers. The shakers are machines that vibrate - they have mesh screens, where the size of the mesh is chosen to allow mud to pass through, and keep the cuttings above the screens so that they are bounced to the front of the shakers to be dumped. There will be a few shakers (3 to 5 usually), with each one having two or three rows of screens - the top one will be the coarsest mesh (the 'scalper') and take away the big cuttings, with the row beneath it being finer meshed, and the one below even finer still. When the mud (with cuttings removed) drops all the screens it goes back to the pits, though on its way it can go through further conditioning via a sand trap (which is just a pit which the mud flows through allowing any residual sand to drop to the bottom, and the clean mud to pass over the top edge), or machinery like a centrifuge (which removes very fine particles from the mud), or a degasser (which removes gas which may be entrained in the mud).
Now that it's back at the pits, it'll be taken by the mud pumps and circulated down the hole again.