How do massive stars end their life cycle?