I understand what six degrees of freedom is, but I encountered the term of seven degrees of freedom at multiple occasions in robotics. What does is the purpose of that extra degree of freedom?
I guess you are talking about robot arms with 7 DoF like the LBR IIwa from Kuka.
If you have 6 DoF, a given end-effector pose is only reachable in a single configuration of the robot. If you have additional joints, you can still move the arm without moving the end-effector so that for example the ellbow of the arm is not colliding with parts of the environment.
A common scenario would be to place an object into a CNC machine. Your end-effector pose is fixed, but the additional dof gives you more freedom so that your arm does not hit the doors of the machine.
Because the pose of an end effector is 6 dimensional (position(x, y,z) and orientation(ex, ey, ez)), a 6 DOF manipulator is atleast needed to achieve a desired pose. Theoretically, there can be infinite configurations of the robot to achieve the 6D pose.
However, lots of those configurations could have singularities or self/world collisions. There could joint position and torque limits as well, that can curtail the robot's ability to have a feasible inverse kinematics solution and achieve the pose.
Additional degrees of freedom, 7 or more are usually used to overcome the limitations of a 6DOF robot. With 7 or more DOFs, the robot can handle and overcome singularities because there is a larger probability of having atleast 6 DOFs to achieve the desired pose.
Null space optimization is also used here such that the system/robot has redundancy and can use the additional degrees of freedom to pursue secondary tasks like avoiding collisions, maintaining low energy and maintaining a particular elbow/shoulder/wrist configuration.
In the introduction to the paper Efficient Method for redundancy resolution of a 7 DOF Manipulator, by Mihai CRENGANIS & Octavian BOLOGA, they say:
A robotic arm with seven degrees of freedom (DOF) has numerous advantages because it gains a vast working space and high mobility and therefore it can be used in the automotive, aerospace industry and medical domains.