Epidemics spread through contact, movement, behavior, and public health interventions, an inherently relational dynamic in which the infection travels along connections between people, places, or animal species. For this reason, we need mathematical and computational models capable of explicitly representing these connections. This paper introduces the theoretical foundations of network-based epidemic models, such as SIR and SEIR, and demonstrates how graph neural networks (GNNs) can learn the spatiotemporal patterns of transmission from data, overcoming the limitations of classical models. Three case studies are presented: measles, i.e., uneven vaccination coverage, COVID-19, i.e., targeted vaccination of the most central nodes in the contact network, and hantavirus, i.e., a multilevel model linking rodents, the environment, the molecular response, and human-to-human transmission). Since public health decisions must be justifiable, the work devotes particular attention to the explainability of the models: identifying which individuals, contacts, or territories are most critical and which alternative interventions could change the outcome of an epidemic. Finally, an operational pipeline is outlined to translate complex data into reliable and transparent decision support.