In 2002, Grisha Perelman presented a new kind of differential Harnack inequality which involves both the (adjoint) linear heat equation and the Ricci flow. This led to a completely new approach to the Ricci flow that allowed interpretation as a gradient flow which maximizes different entropy functionals. The goal of this book is to explain this analytic tool in full detail for the two examples of the linear heat equation and the Ricci flow. It begins with the original Li-Yau result, presents Hamilton's Harnack inequalities for the Ricci flow, and ends with Perelman's entropy formulas and space-time geodesics. The book is a self-contained, modern introduction to the Ricci flow and the analytic methods to study it. It is primarily addressed to students who have a basic introductory knowledge of analysis and of Riemannian geometry and who are attracted to further study in geometric analysis. No previous knowledge of differential Harnack inequalities or the Ricci flow is required. A publication of the European Mathematical Society (EMS). Distributed within the Americas by the American Mathematical Society.