Quantum computer is known of being more efficient in computation than classical computer, and hence plays a crucial role in computer science. However, due to the instability of physical particles, error correction becomes an important issue when running quantum algorithms. In contrast to classical error correction, quantum error correction has its difficulty because of the freedom of quantum bits. In 1996, Gottesman invented the stabilizer formalism , which established a purely mathematical construction for quantum codes. In 1997, Kitaev first used topological ideas to construct the toric code, which then generalized to the theory of topological quantum codes. In this article we will introduce various constructions of quantum error correction codes and emphasize mainly on the mathematical idea.