After recombination the cosmic gas was left in a cold and neutral state. However, as the first stars and black holes formed within early galactic systems, their UV and X-ray radiation induced a gradual phase transition of the intergalactic gas into the warm and ionized state we currently observe. This process is known as cosmic reionization. Understanding how the energy deposition connected with galaxy and star formation shaped the properties of the intergalactic gas is one of the primary goals of present-day cosmology. In addition, reionization back reacts on galaxy evolution, determining many of the properties of the high-redshift galaxy population that represent the current frontier of our discovery of the cosmos. In these two Lectures we provide a pedagogical overview of cosmic reionization and intergalactic medium and of some of the open questions in these fields.