  The Universe is largely transparent to $\gamma$ rays in the GeV energy range,
making these high-energy photons valuable for exploring energetic processes in
the cosmos. After seven years of operation, the Fermi {\it Gamma-ray Space
Telescope} has produced a wealth of information about the high-energy sky. This
review focuses on extragalactic $\gamma$-ray sources: what has been learned
about the sources themselves and about how they can be used as cosmological
probes. Active galactic nuclei (blazars, radio galaxies, Seyfert galaxies) and
star-forming galaxies populate the extragalactic high-energy sky. Fermi
observations have demonstrated that these powerful non-thermal sources display
substantial diversity in energy spectra and temporal behavior. Coupled with
contemporaneous multifrequency observations, the Fermi results are enabling
detailed, time-dependent modeling of the energetic particle acceleration and
interaction processes that produce the $\gamma$ rays, as well as providing
indirect measurements of the extragalactic background light and intergalactic
magnetic fields. Population studies of the $\gamma$-ray source classes compared
to the extragalactic $\gamma$-ray background place constraints on some models
of dark matter. Ongoing searches for the nature of the large number of
$\gamma$-ray sources without obvious counterparts at other wavelengths remains
an important challenge.
