The sphere packing problem asks for the densest configuration of non-overlapping unit balls in space. In this talk I shall speak about the sphere packing problem in various spaces and its generalizations. The talk will focus on linear programming and semidefinite programming methods as powerful tools for analyzing and, in some cases, completely solving geometric optimization questions.