These lecture notes originate from a course delivered at the Scuola Normale in Pisa in2006. The book mainly deals with Diophantine problems on affine curves, in practice describing the integer solutions of equations in two variables. This case historically suggested some major ideas for more general problems. Starting with linear and quadratic equations, the important connections with Diophantine Approximation are presented and Thue’s celebrated results are proved in full detail. In later chapters more modern issues on heights of algebraic points are dealt with, and applied to a sharp quantitative treatment of the unit equation. The volume also contains several Supplements, hinted exercises and an Appendix on recent work on heights.