We use the EAGLE suite of cosmological hydrodynamical simulations to study how the H I content of present-day galaxies depends on their environment. We show that EA-GLE reproduces observed H I mass-environment trends very well, while semi-analytic models typically overpredict the average H I masses in dense environments. The environmental processes act primarily as an on/off switch for the H I content of satellites with M * > 10 9 M . At a fixed M * , the fraction of H I-depleted satellites increases with increasing host halo mass M 200 in response to stronger environmental effects, while at a fixed M 200 it decreases with increasing satellite M * as the gas is confined by deeper gravitational potentials. H I-depleted satellites reside mostly, but not exclusively, within the virial radius r 200 of their host halo. We investigate the origin of these trends by focussing on three environmental mechanisms: ram pressure stripping by the intra-group medium, tidal stripping by the host halo, and satellite-satellite encounters. By tracking back in time the evolution of the H I-depleted satellites, we find that the most common cause of H I removal is satellite encounters. The timescale for H I removal is typically less than 0.5 Gyr. Tidal stripping occurs in halos of M 200 < 10 14 M within 0.5 × r 200 , while the other processes act also in more massive halos, generally within r 200 . Conversely, we find that ram pressure stripping is the most common mechanism that disturbs the H I morphology of galaxies at redshift z = 0. This implies that H I removal due to satellite-satellite interactions occurs on shorter timescales than the other processes.