  Star formation is observed to be suppressed in group and cluster galaxies
compared to the field. To gain insight into the quenching process, we have
analysed ~2000 galaxies formed in the GIMIC suite of cosmological
hydrodynamical simulations. The time of quenching varies from ~2 Gyr before
accretion (first crossing of r200,c) to >4 Gyr after, depending on satellite
and host mass. Once begun, quenching is rapid (>~ 500 Myr) in low-mass galaxies
(M* < 10^10 M_Sun), but significantly more protracted for more massive
satellites. The simulations predict a substantial role of outflows driven by
ram pressure -- but not tidal forces -- in removing the star-forming
interstellar matter (ISM) from satellite galaxies, especially dwarfs (M* ~ 10^9
M_Sun) where they account for nearly two thirds of ISM loss in both groups and
clusters. Immediately before quenching is complete, this fraction rises to ~80%
even for Milky Way analogues (M* ~ 10^10.5 M_Sun) in groups (M_host ~ 10^13.5
M_Sun). We show that (i) ISM stripping was significantly more effective at
early times than at z = 0; (ii) approximately half the gas is stripped from
`galactic fountains' and half directly from the star forming disk; (iii)
galaxies undergoing stripping experience ram pressure up to ~100 times the
average at a given group/cluster-centric radius, because they are
preferentially located in overdense ICM regions. Remarkably, stripping causes
at most half the loss of the extended gas haloes surrounding our simulated
satellites. These results contrast sharply with the current picture of
strangulation -- removal of the ISM through star formation after stripping of
the hot halo -- being the dominant mechanism quenching group and cluster
satellites.
