This article gives a review of optimization of structures in mechanical contact. Emphasis is put on linear elastic structures in frictionless contact. In particular, for optimization problems where an energy objective is used, a unified framework is given in parallel with the review. Papers related to optimal control of variational inequalities or dealing with pure sensitivity analysis are treated in less detail. Problems involving friction are also reviewed at a less detailed level. It is explained why structural optimization problems involving contact cannot be treated within classical smooth optimization theory and how they relate to modern fields such as nonsmooth optimization and mathematical programs with equilibrium constraints (MPECs). Throughout the article, discrete and continuous problems are treated in parallel. This review article includes 106 references.