Mechanical joint

A mechanical joint is a section of a machine which is used to connect one or more mechanical part to another. Mechanical joints may be temporary or permanent; most types are designed to be disassembled. Most mechanical joints are designed to allow relative movement of these mechanical parts of the machine in one degree of freedom, and restrict movement in one or more others.

Pin 
A pin joint, also called a revolute joint, is a one-degree-of-freedom kinematic pair. It constrains the motion of two bodies to pure rotation along a common axis. The joint doesn't allow translation, or sliding linear motion. This is usually done through a rotary bearing. It enforces a cylindrical contact area, which makes it a lower kinematic pair, also called a full joint.

Prismatic

A prismatic joint provides a linear sliding movement between two bodies, and is often called a slider, as in the slider-crank linkage.  A prismatic pair is also called as sliding pair. A prismatic joint can be formed with a polygonal cross-section to resist rotation.

The relative position of two bodies connected by a prismatic joint is defined by the amount of linear slide of one relative to the other one.  This one parameter movement identifies this joint as a one degree of freedom kinematic pair.

Prismatic joints provide single-axis sliding often found in hydraulic and pneumatic cylinders.

Ball

In an automobile, ball joints are spherical bearings that connect the control arms to the steering knuckles.  They are used on virtually every automobile made  and work similarly to the ball-and-socket design of the human hip joint.

A ball joint consists of a bearing stud and socket enclosed in a casing; all these parts are made of steel. The bearing stud is tapered and threaded, and fits into a tapered hole in the steering knuckle. A protective encasing prevents dirt from getting into the joint assembly.  Usually, this is a rubber-like boot that allows movement and expansion of lubricant. Motion-control ball joints tend to be retained with an internal spring, which helps to prevent vibration problems in the linkage.

The "offset" ball joint provides means of movement in systems where thermal expansion and contraction, shock, seismic motion, and torsional motions, and forces are present.

Cotterpin

This is mainly used to connect rigidly two rods which transmit motion in the axial direction, without rotation. These joints may be subjected to tensile or compressive forces along the axes of the rods. The very famous example is the joining of piston rod's extension with the connecting rod in the cross head assembly.

Advantages:
Quick assembly and disassembly is possible
It can take tensile as well as compressive force.

Application:
Joint between piston rod and cross head of a steam engine
Joint between valve rod and its steam
A steam engine connecting rod strap end 
Foundation bolt

Bolted
A bolted joint is a mechanical joint which is the most popular choice for connecting two members together. It is easy to design and easy to procure parts for, making it a very popular design choice for many applications.

Advantage:

 Joints are easily assembled/ disassembled by using a torque wrench or other fastener tooling.
 Clamped members can be axially tensioned at variable preloads. 

Disadvantage:

 Threaded components can fail from fatigue failure. 
 Joints can come loose, requiring re-torqueing.

Application:
Pipe flanges
Automotive engines
Wind power generator foundation bolts

Screw

Universal

References

Kinematics
Rigid bodies
Mechanical engineering
Hardware (mechanical)
Mechanical fasteners