© 2014 The Authors Published by Oxford University Press on behalf of the Royal Astronomical Society. We present a series of high-resolution cosmological simulations1 of galaxy formation to z = 0, spanning halo masses ~108-1013M, and stellar masses ~104-1011M. Our simulations include fully explicit treatment of themultiphase interstellarmedium and stellar feedback. The stellar feedback inputs (energy, momentum, mass, and metal fluxes) are taken directly from stellar population models. These sources of feedback, with zero adjusted parameters, reproduce the observed relation between stellar and halo mass up to Mhalo~ 1012M. We predict weak redshift evolution in the M*-Mhalorelation, consistent with current constraints to z > 6. We find that the M*-Mhalorelation is insensitive to numerical details, but is sensitive to feedback physics. Simulations with only supernova feedback fail to reproduce observed stellar masses, particularly in dwarf and high-redshift galaxies: radiative feedback (photoheating and radiation pressure) is necessary to destroy giant molecular clouds and enable efficient coupling of later supernovae to the gas. Star formation rates (SFRs) agree well with the observed Kennicutt relation at all redshifts. The galaxy-averaged Kennicutt relation is very different from the numerically imposed law for converting gas into stars, and is determined by self-regulation via stellar feedback. Feedback reduces SFRs and produces reservoirs of gas that lead to rising latetime star formation histories, significantly different from halo accretion histories. Feedback also produces large short-time-scale variability in galactic SFRs, especially in dwarfs. These properties are not captured by common 'sub-grid' wind models.