Drilling mud, also known as drilling fluid, is a product used in the process of drilling deep boreholes. These holes may be drilled for oil and gas extraction, core sampling, and a wide variety of other reasons. The mud can be an integral part of the drilling process, serving a number of functions. One of the most critical roles of this mud is as a lubricant. Drilling generates tremendous friction, which can damage the drill or the formation being drilled. Drilling mud cuts down on the friction, lowering the heat of drilling and reducing the risk of friction-related complications. The mud also acts as a carrier for the materials being drilled, with material becoming suspended in the mud and then being carried up the drill to the surface. Using this substance protects the stability of a borehole by controlling variables such as friction and pressure. Different muds are needed for different circumstances, and the selection and formulation of mud is managed by a mud engineer. This engineer determines the correct viscosity level for the mud, and adjusts factors such as its density as well. Water, oil, and gas-based muds can all be used, with products ranging from true mud made with materials like bentonite clays to synthetic drilling fluid.
http://www.wisegeek.org/what-is-drilling-mud.htm
Courtesy of the Energy Institute and of Baker Hughes
http://science.howstuffworks.com/environmental/energy/oil-drilling4.htm