Within LCDM, galaxies are regulated by both large-scale processes such as mergers, tidal torques and smooth accretion via filaments, as well as by small-scale processes such as star formation and feedback. These mechanisms leave characteristic signatures imprinted in the stellar, gaseous, and dark matter halos of the galaxy. We use numerical simulations to study these halos and focus on establishing the link between halo observables today and the past evolution of galaxies. We find that stellar halos in Milky Way (MW)-like objects have a wide variety of masses and shapes that strongly correlate with their assembly histories. In particular, the low stellar halo fraction of our own Galaxy indicates an overall early and quiet assembly history. The recent detection of a major merger event ~10 Gyr ago leading to a massive and radial stellar halo component seems plausible, although its compactness is difficult to reproduce within LCDM. We predict that a significant fraction of the mass associated with this merger may lie undiscovered in the outskirts of the MW's stellar halo. Further clues on galaxy assembly histories may lurk in their gaseous halos, whose observational study has only recently become possible for large galaxies. Using intermediate-volume simulations, we investigate the potential of MUSE to detect the gaseous filaments feeding galaxy halos and tracing the cosmic web. We find that including feedback effects and degrading pixel resolution may increase the detectability of these flows in realistic mock images. Furthermore, filaments are affected by feedback, providing powerful observational constraints to theoretical models. The phenomenon of feedback remains, however, too simplistically modeled within cosmological simulations and is expected to have its maximum impact on low-mass galaxies. We use idealized numerical simulations of a dwarf halo to understand the interplay between two possible feedback sources: stars and black holes. We find that although black holes negligibly affect the star formation history of the dwarf, they may leave strong signatures on outflow properties. The future observational detection of these outflows promises novel constraints on black hole growth as well as stellar and black hole feedback models in cosmological numerical simulations.