Their name, as implied, simply refers to a classic doughnut or torus shape, and they exist purely to create a better, more leak-proof seal between two other components, with the aim usually being to prevent the unwanted escape of gases or liquids. In this sense, they're effectively a type of gasket - the main difference being that o-rings are more commonly used in very high-pressure environments, where a normal cork, paper or rubber gasket would likely be prone to failure.
http://www.yuefeng-seal.com/o-rings/