The application of molecular dynamics to the modeling of glasses is reviewed. Several examples are used to illustrate the value of these computer simulations in advancing our understanding of the structure of silicate glasses. The mixed alkali effect is explained in terms of structural variations in going from single alkali to mixed alkali glasses that lead to distinct environments for each type of alkali ion and also result in the smaller alkali ion becoming more tightly bound to the network. Some recent results on the structure of silicate melts are presented, and the relationship between the structures of glass and melt are discussed.