Ramanujan is recognized as one of the great number theorists of the twentieth century. Here now is the first book to provide an introduction to his work in number theory. Most of Ramanujan's work in number theory arose out of $q$-series and theta functions. This book provides an introduction to these two important subjects and to some of the topics in number theory that are inextricably intertwined with them, including the theory of partitions, sums of squares and triangular numbers, and the Ramanujan tau function. The majority of the results discussed here are originally due to Ramanujan or were rediscovered by him. Ramanujan did not leave us proofs of the thousands of theorems he recorded in his notebooks, and so it cannot be claimed that many of the proofs given in this book are those found by Ramanujan. However, they are all in the spirit of his mathematics. The subjects examined in this book have a rich history dating back to Euler and Jacobi, and they continue to be focal points of contemporary mathematical research. Therefore, at the end of each of the seven chapters, Berndt discusses the results established in the chapter and places them in both historical and contemporary contexts. The book is suitable for advanced undergraduates and beginning graduate students interested in number theory.