Branching processes are used to model diverse social and physical scenarios, from extinction of family names to nuclear fission. However, for a better description of natural phenomena, such as viral epidemics in cellular tissues, animal populations and social networks, a spatial embedding-the branching random walk (BRW)-is required. Despite its wide range of applications, the properties of the volume explored by the BRW so far remained elusive, with exact results limited to one dimension. Here we present analytical results, supported by numerical simulations, on the scaling of the volume explored by a BRW in the critical regime, the onset of epidemics, in general environments. Our results characterise the spreading dynamics on regular lattices and general graphs, such as fractals, random trees and scale-free networks, revealing the direct relation between the graphs' dimensionality and the rate of propagation of the viral process. Furthermore, we use the BRW to determine the spectral properties of real social and metabolic networks, where we observe that a lack of information of the network structure can lead to differences in the observed behaviour of the spreading process. Our results provide observables of broad interest for the characterisation of real world lattices, tissues, and networks