Ball joints are flexible joints consisting of a ball with a protruding stud that has been captured inside an outer housing. They allow simultaneous limited motion in all directions, including rotation as well as angular. Ball joints are frequently used in applications which allow motion on one or two axes but restrict motion on others.
Along these lines, a common use for ball joints is within automobile suspension systems. In this case the vehicle's wheels are allowed to turn and move up and down but are not allowed to move laterally. Other uses include industrial equipment involving repetitive motion.
The components of an automotive ball joint.
Image credit: ExpeditionPortal