The spatial structure of populations is a key element in the description and understanding of the spatiotemporal propagation of infectious diseases spread. Host population in space is often characterized by a highly fragmented environment where it is structured and localized in relatively isolated discrete patches or subpopulations connected by some degree of hosts movements. Metapopulation models provide the ideal theoretical framework to capture the separation of a host population into local communities, with strong homogeneous mixing within each community and weaker interactions between communities corresponding to the underlying substrate of commuting patterns, mobility networks and/or transportation infrastructures. This paradigm can be applied to model the spatiotemporal propagation of epidemics in structured populations at different scales, by considering for example families, city locations, hospital wards, farms, urban areas or regions as local communities connected by hosts’ mobility processes. Here we present the computational approach to the modeling of epidemic processes in spatially structured systems. We introduce metapopulation models as the standard modeling framework for the study of epidemic spread among localized communities of hosts. Taking into account the coupling provided by the interactions among localized populations, different modeling approaches are described, including mechanistic (i.e. microscopic) simulations and effective approaches, and the possible presence of memory effects. Topics like invasion dynamics and local vs. global containment of an emerging epidemic will be addressed, and the theoretical results will be put in relation with the design of possible intervention policies for epidemic control. These notes represent a theoretical introduction for the development of data-driven realistic metapopulation models for application in public health.