ABMs operate by defining rules for how agents behave and interact within the simulation. Each agent is programmed with specific attributes and behaviors, such as susceptibility to disease, movement patterns, and contact rates. These interactions are then simulated over time to observe emergent phenomena, such as disease outbreaks, spread patterns, and intervention impacts.