An Analysis of the Use After Free Vulnerability (CWE-416)

What is it, Where does it happen, How can we prevent it?