We report a comprehensive neutron-scattering study of the evolution of the magnetic excitations in La2-xSrxCuO4 for 0≤x≤0.04. We first present accurate measurements of the magnetic correlation length and the sublattice magnetization of a carrier-free La2CuO4 crystal and analyze these in the context of recent theoretical predictions. We then systematically investigate the influence of different dopants on the magnetism: Our measurements indicate that static vacancies in the La2Cu1-yZnyO4 system affect the magnetic correlations in a similar manner as electrons in Pr2-xCexCuO4. The magnetic correlation length is much more rapidly suppressed as a function of x in La2-xSrxCuO4, and for x≤0.04 we find that it obeys the empirical relation ξ-1(x,T)=ξ-1(x,0)+ξ-1(0,T), where ξ(0,T) is the measured correlation length of the carrier-free sample. We also report an extensive set of measurements of the dynamical magnetic response function of a crystal of composition La1.96Sr0.04CuO4 for excitation energies 0.75≤ω≤45 meV and temperatures 1.5≤T≤500 K. The dc conductivity of this crystal exhibits three different regimes: metallic for T100 K, weakly localized for 100T10 K, and strongly localized below ∼1 K. Our neutron measurements show that the generalized susceptibility of this sample follows a surprisingly simple scaling function in the variable ω/T. This observation allows us to relate our data to a variety of normal-state properties of the layered copper oxides, in particular the dc and ac conductivities. Finally, at temperatures below ∼20 K a ''central peak'' with a characteristic energy scale of less than 0.1 meV becomes prominent. Its relation to the localization of the charge carriers at low temperatures remains speculative.