In this talk I will show how to derive the so-called master equation introduced by P.- L. Lions. After detailing the existing literature on these problems, for simplicity, we will mainly focus on deterministic models in the case of potential games. In this case the master equation can be linked to optimal control problems on infinite dimensional spaces. I will point out an important application of the master equation to justify the mean field limit of Nash equilibria of differential games with finitely many players, when the number of players tends to infinity. In both talks I will mention some important open problems.