The six degrees of freedom, also known as the six degrees of motion, refer to the control of the three rotational degrees of freedom (pitch, roll, and yaw) and the three translational degrees of freedom (vertical, lateral, and longitudinal) of a rigid body in three dimensional space. They are most commonly talked about in relation to aircraft, ships and robotics, but can apply to the movement of anything.
To understand the rotational degrees of pitch, yaw and roll, or an object's ability to rotate, it helps to imagine three lines running through an aircraft, intersecting at right angles at its center of gravity. One line running from front to back, one from left to right and one from top to bottom. Rotation around the left to right axis is called pitch. Rotation around the front to back axis is called roll. Rotation around the top to bottom axis is called yaw.
An object's ability to move forwards and backwards, up and down and left and right is dependent upon its lateral (pitch), longitudinal (roll) and vertical (yaw) degrees of freedom, respectively.