The plane-wave method with pseudopotentials has been the most widely used approach in solid-state electronic structure calculations. There is, however, usually a substantial gap from the fundamental physics to a practical code that could yield the detailed energy band structure for a solid. This review aims at giving a comprehensive introduction to the problem setting, fundamental strategy as well as various techniques involved in a typical plane-wave-based code. It starts from college quantum mechanics and ends up with some up-to-date topics such as the optimized norm-conserving Vanderbilt pseudopotential and the efficient diagonalization process of the Hamiltonian. It attempts to explain the mathematics and physics at the undergraduate level, and fundamental questions like 'why density functional theory', 'why plane wave basis' or 'why pseudopotential' are to be emphasized.