In our current picture of the Universe, galaxies form and evolve in dark-matter structures known as dark-matter halos. Although the relationship between galaxies and halos has been extensively studied in the theory, our observational understanding of the galaxy-halo connection is far more limited. In this Thesis, I will present observational evidence of this connection through spatially resolved spectroscopy for thousands of nearby galaxies from the SDSS-IV MaNGA survey. I will show that the radial stellar metallicity profiles of massive galaxies contain signatures of minor mergers, a key feature of late-time halo growth. I will also show that the stellar populations parameters of passive central galaxies, namely stellar age, iron-abundance, and magnesium-enhancement, depend not only on the stellar mass of the galaxy, but also on proxies for the masses and formation times of their host halos. These results indicate that dark-matter halos not only dictate how much stellar mass central galaxies build-up, but can also affect their star-formation timescales and chemical enrichment histories. Finally, I will show that satellite galaxies are also affected by the properties of dark-matter halos. Satellites in denser local environments feature old, alpha- enriched stellar components, indicating that satellite quenching is facilitated by halo-driven mechanisms.