An O-ring is a donut, or torus shaped seal typically used to prevent the passing of air or fluid. In other words, O-rings are used to keep fluid or air IN or OUT of a defined space.
Basically an O-ring is used to block a pathway that fluid or air may escape through. O-rings are usually put into a groove to hold them in place and then squeezed between two surfaces.
When you squeeze the O-ring between two surfaces you are taking up the clearance and blocking the pathway that the fluid or air wants to escape through.
O-rings are sized by the inside diameter (I.D.) then by the cross section (C/S) or width (W).