**Abstract**

The present chapter provides a comprehensive overview of the multifaceted links connecting the immune system, the intestinal microbiota, and the diet, covering also some recent, less explored, and emerging topics such as the "trained immunity" and the immune cell metabolic activity. The main characteristics of the innate and adaptive immune system are described, as well as the gut-associated lymphoid tissue (GALT). Gut microbiota structure and function are also presented. Particular emphasis is given to the diet as a modulator of the microbiota-immune system crosstalk, focusing on the impact of the three main dietary components (carbohydrates, proteins, and fats) and the different dietary profiles on the gut microbiota, by shaping its composition and the deriving microbial metabolites that influence host health, also through interaction with the immune system. Western and Mediterranean diets are described and chosen as representative models of detrimental and beneficial dietary patterns, respectively.

**Keywords:** innate immunity, GALT, intestinal microbiome, Western diet, Mediterranean diet, metabolic inflammation
