Chondrules are millimeter-sized rounded igneous rocks within chondritic meteorites. Their textures and fractionated mineral chemistries suggest that they formed by repeated, localized, brief (minutes to hours) melting of cold aggregates of mineral dust in the protoplanetary nebula. Astrophysical models of chondrule formation have been unable to explain the petrologically diverse nature of chondrites. However, a nebular shock wave model for chondrule formation agrees with many of the observed petrologic and geochemical properties of chondrules and shows how particles within the nebula are sorted by size and how rims around chondrules are formed. It also explains the volatile-rich nature of chondrule rims and the chondrite matrix.