The origin and evolution of the primordial perturbation is the key to understanding structure formation in the earliest stages of the Universe. It carries clues to the types of physical phenomena active in that extreme high-density environment. Through its evolution, generating first the observed cosmic microwave background anisotropies and later the distribution of galaxies and dark matter in the Universe, it probes the properties and dynamics of the present Universe. This graduate-level textbook gives a thorough account of theoretical cosmology and perturbations in the early Universe, describing their observational consequences and showing how to relate such observations to primordial physical processes, particularly cosmological inflation. With ambitious observational programmes complementing ever-increasing sophistication in theoretical modelling, cosmological studies will remain at the cutting edge of astrophysical studies for the foreseeable future.