There are different types of casing found in production, steam or water injection, or gas wells.
This is typically 20 to 50 feet long and is installed before main drilling in order to prevent the top of the well from caving in. The secondary function of this part of the casing is to aid in the process of circulating the drilling fluid up from the bottom of the well.
This is the next type of casing to be installed during a drilling operation. It can be anywherefrom 300 to 1,200 feet long. Its diameter is smaller than the conductor casing and sits within the conductor when it passes through it. The main purpose of surface casing is to protect fresh water aquifers that are located near the well from being contaminated by hydrocarbons, brine, or other oilfield chemicals. Like the conductor casing, it also serves as a conduit for drilling mud as it returns to the surface and helps protect the drill hole from being damaged during drilling.
This is the longest section of casing found in a well. Its function is to minimize the hazards that come along with subsurface formations that may affect the well. This might be high and low pressure zones, brine deposits, shales, etc. An alternative to the intermediate casing is a liner string which is hung to the previous casing. Liner strings are not cemented in ans as such are not permanent.
This is the last part of casing to be installed. It is the casing that is installed at the deepest portion of the well. This casing provides a mean for the hydrocarbons to enter the annulus and eventually be pumped up the tubing.