Based on the author's own work and results obtained by international teams he coordinated, this SpringerBrief offers a concise discussion of the origin and early evolution of atmospheres of terrestrial planets during the active phase of their host stars, as well as of the environmental conditions which are necessary in order for planets like the Earth to obtain N_2-rich atmospheres. Possible thermal and non-thermal atmospheric escape processes are discussed in a comparative way between the planets in the Solar System and exoplanets. Lastly, a hypothesis for how to test and study the discussed atmosphere evolution theories using future UV transit observations of terrestrial exoplanets within the orbits of dwarf stars is presented.