A mechanical seal is a device that helps join systems or mechanisms together by preventing leakage, containing pressure, or excluding contamination. The effectiveness of a seal is dependent on adhesion in the case of sealants and compression in the case of gaskets.
An O-ring is a mechanical gasket in the shape of a torus; it is a loop of elastomer with a round cross-section, designed to be seated in a groove and compressed during assembly between two or more parts, creating a seal at the interface.
The O-ring may be used in static applications or in dynamic applications where there is relative motion between the parts and the O-ring. Dynamic examples include rotating pump shafts and hydraulic cylinder pistons.
O-rings are one of the most common seals used in machine design because they are inexpensive, easy to make, and reliable and have simple mounting requirements. They can seal tens of megapascals (thousands of psi) of pressure.