Soap froth – the quintessential foam – is composed of polyhedral gas bubbles separated by thin liquid films. How are the bubbles shaped and how are they packed? Why do foams have a shear modulus and yield stress, which we usually associate with solids? These and other questions have been explored through simulations with the Surface Evolver, a computer program developed by Ken Brakke. We will describe foam structures ranging in complexity from perfectly ordered foams based on the Kelvin cell to random polydisperse foams with 12^3 cells in which the individual cells have a wide distribution of shapes and sizes – the former is highly idealized and the latter are very realistic. The calculations are in excellent agreement with seminal experiments by Matzke (1946) on the foam structure, and shear modulus measurements by Princen & Kiss (1986). The connection between elastic-plastic rheology and foam structure involves intermittent cascades of topological transitions; this cell-neighbor switching is a fundamental mechanism of foam flow. We will also discuss diffusive coarsening, a mechanism of foam aging, and crushing low-density solid foams with open cells.