We study the amount and distribution of dark matter substructures within dark matter haloes, using a large set of high-resolution simulations ranging from group-size to cluster-size haloes, and carried out within a cosmological model consistent with Wilkinson Microwave Anisotropy Probe (WMAP) 7-year data. In particular, we study how the measured properties of subhaloes vary as a function of the parent halo mass, the physical properties of the parent halo and redshift. The fraction of halo mass in substructures increases with increasing mass: it is of the order of 5 per cent for haloes with M200∼ 1013 M⊙ and of the order of 10 per cent for the most massive haloes in our sample, with M200∼ 1015 M⊙. There is, however, a very large halo-to-halo scatter that can be explained only in part by a range of halo physical properties, e.g. concentration. At a given halo mass, less concentrated haloes contain significantly larger fractions of mass in substructures because of the reduced strength of tidal disruption. Most of the substructure mass is located at the outskirts of the parent haloes, in relatively few massive subhaloes. This mass segregation appears to become stronger at increasing redshift, and should reflect into a more significant mass segregation of the galaxy population at different cosmic epochs. When haloes are accreted on to larger structures, their mass is significantly reduced by tidal stripping. Haloes that are more massive at the time of accretion (these should host more luminous galaxies) are brought closer to the centre on shorter time-scales by dynamical friction, and therefore suffer a more significant stripping. The halo merger rate depends strongly on the environment with substructure in more massive haloes suffering more important mergers than their counterparts residing in less massive systems. This should translate into a different morphological mix for haloes of different mass.