A thematic introduction to the modern theory of continuum mechanics and thermodynamics is presented from the viewpoint of granular and porous materials. In the approach taken here, granular and porous media are treated as continuous macroscopic systems of which the overall response is significantly influenced and determined by microstructural effects. In the continuum mechanical modeling, those microscale effects are captured by the introduction of so-called internal variables which account for geometric and material inhomogeneities or the multiphase nature of granular mixtures. Describing the evolution of such internal variables by additional balance laws, the resulting continuum-thermodynamical system requires careful analysis, including, e.g. the application of the entropy principle of Müller with the corresponding approach of exploitation as suggested by Liu. The book is self-contained and addresses an interdisciplinary audience including civil and geotechnical engineers, physicists, applied mathematicians, soil mechanicians and continuum mechanicians.