The record superconducting transition temperature (T(c)) for the iron-based high-temperature superconductors (Fe-HTS) has long been 56 K. Recently, in single-layer FeSe films grown on SrTiO3 substrates, indications of a new record of 65 K have been reported. Using in situ photoemission measurements, we substantiate the presence of spin density waves (SDWs) in FeSe films--a key ingredient of Fe-HTS that was missed in FeSe before--and we find that this weakens with increased thickness or reduced strain. We demonstrate that the superconductivity occurs when the electrons transferred from the oxygen-vacant substrate suppress the otherwise pronounced SDWs in single-layer FeSe. Beyond providing a comprehensive understanding of FeSe films and directions to further enhance its T(c), we map out the phase diagram of FeSe as a function of lattice constant, which contains all the essential physics of Fe-HTS. With the simplest structure, cleanest composition and single tuning parameter, monolayer FeSe is an ideal system for testing theories of Fe-HTS.