We report on simultaneous broadband observations of the TeV-emitting blazar Markarian 501 between 2013 April 1 and August 10, including the first detailed characterization of the synchrotron peak with Swift and NuSTAR. During the campaign, the nearby BL Lac object was observed in both a quiescent and an elevated state. The broadband campaign includes observations with NuSTAR, MAGIC, VERITAS, the Fermi Large Area Telescope, Swift X-ray Telescope and UV Optical Telescope, various ground-based optical instruments, including the GASP-WEBT program, as well as radio observations by OVRO, Metsähovi, and the F-Gamma consortium. Some of the MAGIC observations were affected by a sand layer from the Saharan desert, and had to be corrected using eventby-event corrections derived with a Light Detection and Ranging (LIDAR) facility. This is the first time that LIDAR information is used to produce a physics result with Cherenkov Telescope data taken during adverse atmospheric conditions, and hence sets a precedent for the current and future ground-based gamma-ray instruments. The NuSTAR instrument provides unprecedented sensitivity in hard X-rays, showing the source to display a spectral energy distribution (SED) between 3 and 79 keV consistent with a log-parabolic spectrum and hard X-ray variability on hour timescales. None (of the four extended NuSTAR observations) show evidence of the onset of inverse-Compton emission at hard X-ray energies. We apply a single-zone equilibrium synchrotron selfCompton (SSC) model to five simultaneous broadband SEDs. We find that the SSC model can reproduce the observed broadband states through a decrease in the magnetic field strength coinciding with an increase in the luminosity and hardness of the relativistic leptons responsible for the high-energy emission.