A multivariate real polynomial $p$ is nonnegative if $p(x) \geq 0$ for all $x \in R^n$. I will review the history and motivation behind the problem of representing nonnegative polynomials as sums of squares. Such representations are of interest for both theoretical and practical computational reasons and I will discuss several applications. I will then discuss some theoretical aspects of sums of squares representations of nonnegative polynomials, in particular, some underlying fundamental reasons that there exist nonnegative polynomials that are not sums of squares.