This book provides a comprehensive account of the theory of moduli spaces of elliptic curves (over integer rings) and its application to modular forms. The construction of Galois representations, which play a fundamental role in Wiles' proof of the Shimura - Taniyama conjecture, is given. In addition, the book presents an outline of the proof of diverse modularity results of two-dimensional Galois representations (including that of Wiles), as well as some of the author's new results in that direction. In this new second edition, a detailed description of Barsotti - Tate groups (including formal Lie groups) is added to Chapter 1. As an application, a down-to-earth description of formal deformation theory of elliptic curves is incorporated at the end of Chapter 2 (in order to make the proof of regularity of the moduli of elliptic curve more conceptual), and in Chapter 4, though limited to ordinary cases, newly incorporated are Ribet's theorem of full image of modular p-adic Galois representation and its generalization to 'big' lambda-adic Galois representations under mild assumptions (a new result of the author). Though some of the striking developments described above is out of the scope of this introductory book, the author gives a taste of present day research in the area of Number Theory at the very end of the book (giving a good account of modularity theory of abelian Q-varieties and Q-curves).