Clusters of galaxies are self-gravitating systems of mass ~10^14-10^15 Msun. They consist of dark matter (~80 %), hot diffuse intracluster plasma (< 20 %) and a small fraction of stars, dust, and cold gas, mostly locked in galaxies. In most clusters, scaling relations between their properties testify that the cluster components are in approximate dynamical equilibrium within the cluster gravitational potential well. However, spatially inhomogeneous thermal and non-thermal emission of the intracluster medium (ICM), observed in some clusters in the X-ray and radio bands, and the kinematic and morphological segregation of galaxies are a signature of non-gravitational processes, ongoing cluster merging and interactions. In the current bottom-up scenario for the formation of cosmic structure, clusters are the most massive nodes of the filamentary large-scale structure of the cosmic web and form by anisotropic and episodic accretion of mass. In this model of the universe dominated by cold dark matter, at the present time most baryons are expected to be in a diffuse component rather than in stars and galaxies; moreover, ~50 % of this diffuse component has temperature ~0.01-1 keV and permeates the filamentary distribution of the dark matter. The temperature of this Warm-Hot Intergalactic Medium (WHIM) increases with the local density and its search in the outer regions of clusters and lower density regions has been the quest of much recent observational effort. Over the last thirty years, an impressive coherent picture of the formation and evolution of cosmic structures has emerged from the intense interplay between observations, theory and numerical experiments. Future efforts will continue to test whether this picture keeps being valid, needs corrections or suffers dramatic failures in its predictive power.