The Casimir effect in quantum electrodynamics (QED) is perhaps the best-known example of fluctuation-induced long-ranged force acting on objects (conducting plates) immersed in a fluctuating medium (quantum electromagnetic field in vacuum). A similar effect emerges in statistical physics, where the force acting, e.g., on colloidal particles immersed in a binary liquid mixture is affected by the classical thermal fluctuations occurring in the surrounding medium. The resulting Casimir-like force acquires universal features upon approaching a critical point of the medium and becomes long-ranged at criticality. In turn, this universality allows one to investigate theoretically the temperature dependence of the force via representative models and to stringently test the corresponding predictions in experiments. In contrast to QED, the Casimir force resulting from critical fluctuations can be easily tuned with respect to strength and sign by surface treatments and temperature control. We present some recent advances in the theoretical study of the universal properties of the critical Casimir force arising in thin films. The corresponding predictions compare very well with the experimental results obtained for wetting layers of various fluids. We discuss how the Casimir force between a colloidal particle and a planar wall immersed in a binary liquid mixture has been measured with femto-Newton accuracy, comparing these experimental results with the corresponding theoretical predictions.