In this survey we report some recent results in the mathematical modeling of epidemic phenomena through the use of kinetic equations. We initially consider models of interaction between agents in which social characteristics play a key role in the spread of an epidemic, such as the age of individuals, the number of social contacts, and their economic wealth. Subsequently, for such models, we discuss the possibility of containing the epidemic through an appropriate optimal control formulation based on the policy maker's perception of the progress of the epidemic. The role of uncertainty in the data is also discussed and addressed. Finally, the kinetic modeling is extended to spatially dependent settings using multiscale transport models that can characterize the impact of movement dynamics on epidemic advancement on both one-dimensional networks and realistic two-dimensional geographic settings.