This is the first comprehensive introduction to the powerful moment approach for solving global optimization problems (and some related problems) described by polynomials (and even semi-algebraic functions). In particular, the author explains how to use relatively recent results from real algebraic geometry to provide a systematic numerical scheme for computing the optimal value and global minimizers. Indeed, among other things, powerful positivity certificates from real algebraic geometry allow one to define an appropriate hierarchy of semidefinite (SOS) relaxations or LP relaxations whose optimal values converge to the global minimum. Several extensions to related optimization problems are also described. Graduate students, engineers and researchers entering the field can use this book to understand, experiment with and master this new approach through the simple worked examples provided.