Starting with the theory of ion generation, extraction, acceleration and focusing, the different types of gas discharges and ion sources based on them are described. Then hardware of single-beamlet sources, neutral beam injectors and ion thrusters are discussed.