We present a study of satellites in orbit around a high-resolution, smoothed particle hydrodynamics (SPH) galaxy simulated in a cosmological context. The simulated galaxy is approximately of the same mass as the Milky Way. The cumulative number of luminous satellites at z= 0 is similar to the observed system of satellites orbiting the Milky Way although an analysis of the satellite mass function reveals an order of magnitude more dark satellites than luminous satellites. Some of the dark subhaloes are more massive than some of the luminous subhaloes at z= 0. What separates luminous and dark subhaloes is not their mass at z= 0, but the maximum mass the subhaloes ever achieve. We study the effect of four mass-loss mechanisms on the subhaloes: ultraviolet (UV) ionizing radiation, ram-pressure stripping, tidal stripping and stellar feedback, and compare the impact of each of these four mechanisms on the satellites. In the lowest mass subhaloes, UV is responsible for the majority of the baryonic mass-loss. Ram-pressure stripping removes whatever mass remains from the low-mass satellites. More massive subhaloes have deeper potential wells and retain more mass during reionization. However, as satellites pass near the centre of the main halo, tidal forces cause significant mass-loss from satellites of all masses. Satellites that are tidally stripped from the outside can account for the luminous satellites that are of lower mass than some of the dark satellites. Stellar feedback has the greatest impact on medium-mass satellites that had formed stars, but lost all their gas by z= 0. Our results demonstrate that the missing-satellite problem is not an intractable issue with the cold dark matter cosmology, but is rather a manifestation of baryonic processes.