Starting with the first gravitational-wave detection in September 2015, the LIGO and Virgo gravitational-wave detectors are revealing a new astrophysical population of merging binary black holes and neutron stars. This dissertation focuses on the astrophysical and cosmological lessons enabled by the rapidly growing catalog of gravitational-wave detections. In the first part of the dissertation, we study the properties of the binary black hole population, including the shape of the black hole mass function, the distribution of spins, and the merger rate and its evolution in cosmic time. We show that measuring the spins of the black holes in a merging system can reveal whether they themselves formed from previous mergers. Analyzing the masses of the black holes detected by LIGO, we show the first evidence for missing black holes in the mass range $\sim 50$ -- $100 \ M_\odot$, and discuss the implications for stellar evolution and supernova theory. We also analyze the pairing of component black holes in a binary, and find that black holes tend to merge with similar mass partners rather than pairing randomly. Additionally, we analyze the binary black hole merger rate as a function of redshift and the implications for the formation rate of the progenitor stars and the time delays between formation and merger. The second part of the dissertation focuses on gravitational-wave cosmology. We explore the potential of gravitational-wave signals to measure the Hubble constant, and perform the first such statistical standard siren measurement of the Hubble constant using gravitational-wave data together with a galaxy catalog.