A central problem in galaxy formation is to understand why star formation is so inefficient. Within individual galaxies, gas is converted into stars at a rate two orders of magnitude slower than unimpeded gravitational collapse predicts, a fact embodied in the low normalization of the observed Kennicutt-Schmidt (K-S) relationship between star formation rate surface density and gas surface density. Star formation in galaxies is also globally inefficient in the sense that the stellar mass in dark matter halos is a small fraction of the universal baryon fraction. I will show that these two facts can be explained by the self-regulation of star formation by feedback from massive stars. Within galaxies, stellar feedback drives turbulence that supports the interstellar medium against collapse and the K-S law is set by the low strength of gravity relative to stellar feedback. The energy input from the same stellar feedback processes drive powerful galactic outflows that remove most of the gas accreted from the intergalactic medium before it has time to turn into stars. Using cosmological hydrodynamical simulations from our FIRE project ("Feedback In Realistic Environments"), I will show that gas removal by star formation-driven galactic winds successfully explains the observed galaxy stellar mass function, at least for galaxies less massive than the Milky Way, and discuss the observational signatures of circum-galactic gas flows. Feedback from massive black holes may be required to explain the quenching of galaxies much more massive than the Milky Way.