We present classical and recent results on K\"ahler-Einstein metrics on
compact complex manifolds, focusing on existence, obstructions and relations to
algebraic geometric notions of stability (K-stability). These are the notes for
the SMI course "K\"ahler-Einstein metrics" given by C.S. in Cortona (Italy),
May 2017. The material is not intended to be original