A fitting is a detachable piece of pipe or tubing that either connects to another piece of pipe or tubing or connects two such pieces. Fittings are generally used in mechanical and plumbing operations for a number of different purposes. There are many different kinds of fittings, made from a variety of materials: some of the most common types are elbows, tees, wyes, crosses, couplings, unions, compression fittings, caps, plugs and valves.

...
A pipe system with various fittings

Elbows

Elbows, also known as "ells," are used to change the direction of a pipe system. An elbow typically features a 45- or 90-degree bend, although other angles are also available. Elbows come in a variety of diameters and are generally threaded for connectivity. A common example of an elbow fitting in the home is the piece that extends from the wall of your shower to which the shower head connects.

Tees, Wyes and Crosses

Tee, wye and cross fittings are all used to combine or split pipe or tube sections. Their names describe the basic design of each: tee and wye fittings each have one input and two outputs (or vice versa), intersecting at 90 and 45 degree angles, respectively; cross fittings have one input and three outputs (or vice versa) that intersect at 90 degree angles. All three designs come in standard designs (in which all outlets/inlets are the same diameter) and reducing designs (in which one or more is a different size).

Couplings and Unions

Couplings and unions come in a number of different sizes and designs. The basic function of each is simply to connect two pieces of pipe or tubing. Therefore, couplings and unions are generally quite short fittings. The main difference between couplings and unions is that couplings are designed to be somewhat permanent and are often welded in place or secured by a series of bolts and nuts, while unions are designed to be easily removed at any time.

Compression Fittings

Compression fittings are generally made up of three pieces: a body, nut and gasket ring (or ferule). They use pressure to tighten connections, thereby preventing leakage. These fittings are used in many different industries, as well as many places throughout the house, such as in toilets and faucets.

Caps and Plugs

Caps and plugs perform basically the same function but in different ways. A cap, as its name suggests, is a cap that goes over the end of a pipe, creating a dead end. Plugs also stop up a pipe or tube system, but are plugged, like a stopper, into the end of the pipe.

Valves

Valves, while considered fittings, are sometimes placed in their own category because of their complexity and variety. There are many different types of valves but the one unifying attribute is that they control the flow of fluids and gases through a system. In addition, some valves are also used to control temperature. Some common types of valves are butterfly, gate, globe and ball. Sink and shower/bathtub faucets are among the most common types of valves.

Composition

Fittings may be composed of a number of different materials. The most important consideration is that each fitting be made of a material compatible with the material composition of the rest of the pipe or tube system. Some of the most common materials used to create fittings are copper, steel, brass and PVC.