Measure Theory/Basic Structures And Definitions/Semialgebras, Algebras and σ-algebras
Roughly speaking, a semialgebra over a set is a class that is closed under intersection and semi closed under set difference. Since these restrictions are strong, it's very common that the sets in it have a defined characterization and then it's easier to construct measures over those sets. Then, we'll see the structure of an algebra, that it's closed under set difference, and then the σ-algebra, that it is an algebra and closed under countable unions. The first structures are of importance because they appear naturally on sets of interest, and the last one because it's the central structure to work with measures, because of its properties.
An algebra over a set is a class closed under all finite set operations.
This definition suffices for the closure under finite operations. The following properties shows it
Note: It's easy to see that , so an algebra is closed for all finite set operations.
A σ-algebra (also called σ-ring) over a set is an algebra closed under countable unions.
Note: A σ-algebra is also closed under countable intersections, because the complement of a countable union, is the countable intersection of the complement of the sets considered in the union.
Borel Sets 
Let be a set and let be a collection of subsets of . Then, there exists a smallest σ-ring containing , that is, if is a σ-ring containing , then
Let be the intersection of all σ-rings that contain . It is easy to see that and that and thus, is a σ-ring.
is sometimes said to be the extension of
Now, let be a topology over . Thus, there exists a σ-algebra over such that . Members of are called Borel sets