A surface code is a family of topological stabilizer codes on a two-dimensional cellulation. In a standard square-lattice convention, qubits lie on edges, an X-type check multiplies X on edges meeting a vertex, and a Z-type check multiplies Z around a face.
Vertex and face checks commute because their overlaps contain zero or two edges. A local Pauli operator error changes nearby check signs, producing an error syndrome. Chains of errors have syndromes at their endpoints; a chain connecting appropriate boundaries or winding around a nontrivial cycle can instead implement a logical operation. Locality makes repeated syndrome extraction useful, but a sufficiently long undetected chain can still corrupt the encoded state. The associated surface-code anyon model describes the electric and magnetic check excitations and their mutual braiding.
New to topics? Read the docs here!