Minimizing the effect of noise is essential for quantum computers. The conventional method to protect qubits against noise is through quantum error correction. However, for current quantum hardware in the so-called noisy intermediate-scale quantum (NISQ) era, noise presents in these systems and is too high for error correction to be beneficial. Quantum error mitigation is a set of alternative methods for minimizing errors, including error extrapolation, probabilistic error cancellation, measurement error mitigation, subspace expansion, symmetry verification, virtual distillation, etc. The requirement for these methods is usually less demanding than error correction. Quantum error mitigation is a promising way of reducing errors on NISQ quantum computers. This paper gives a comprehensive introduction to quantum error mitigation. The state-of-art error mitigation methods are covered and formulated in a general form, which provides a basis for comparing, combining and optimizing different methods in future work.