An undergraduate-level introduction to number theory, with the emphasis on fully explained proofs and examples. Exercises, together with their solutions are integrated into the text, and the first few chapters assume only basic school algebra. Elementary ideas about groups and rings are then used to study groups of units, quadratic residues and arithmetic functions with applications to enumeration and cryptography. The final part, suitable for third-year students, uses ideas from algebra, analysis, calculus and geometry to study Dirichlet series and sums of squares. In particular, the last chapter gives a concise account of Fermat's Last Theorem, from its origin in the ancient Babylonian and Greek study of Pythagorean triples to its recent proof by Andrew Wiles.