We compute upper limits on the nanohertz-frequency isotropic stochastic
gravitational wave background (GWB) using the 9-year data release from the
North American Nanohertz Observatory for Gravitational Waves (NANOGrav)
collaboration. We set upper limits for a GWB from supermassive black hole
binaries under power law, broken power law, and free spectral coefficient GW
spectrum models. We place a 95\% upper limit on the strain amplitude (at a
frequency of yr$^{-1}$) in the power law model of $A_{\rm gw} < 1.5\times
10^{-15}$. For a broken power law model, we place priors on the strain
amplitude derived from simulations of Sesana (2013) and McWilliams et al.
(2014). We find that the data favor a broken power law to a pure power law with
odds ratios of 22 and 2.2 to one for the McWilliams and Sesana prior models,
respectively. The McWilliams model is essentially ruled out by the data, and
the Sesana model is in tension with the data under the assumption of a pure
power law. Using the broken power-law analysis we construct posterior
distributions on environmental factors that drive the binary to the GW-driven
regime including the stellar mass density for stellar-scattering, mass
accretion rate for circumbinary disk interaction, and orbital eccentricity for
eccentric binaries, marking the first time that the shape of the GWB spectrum
has been used to make astrophysical inferences. We then place the most
stringent limits so far on the energy density of relic GWs,
$\Omega_\mathrm{gw}(f)\,h^2 < 4.2 \times 10^{-10}$, yielding a limit on the
Hubble parameter during inflation of $H_*=1.6\times10^{-2}~m_{Pl}$, where
$m_{Pl}$ is the Planck mass. Our limit on the cosmic string GWB,
$\Omega_\mathrm{gw}(f)\, h^2 < 2.2 \times 10^{-10}$, translates to a
conservative limit of $G\mu<3.3\times 10^{-8}$ - a factor of 4 better than the
joint Planck and high-$l$ CMB data from other experiments.