To transmit information through a noisy channel in a reliable way, one has to deal with the effect of errors. It is customary to counteract such unwanted effects by exploiting redundancy. This is the subject of the error correction theory that we present here, by focusing for the sake of simplicity only on bits and qubits.