What If a Supernova Hits Earth?

Supernovae are the most powerful explosions in the universe, unleashing enough energy to outshine galaxies. So what would happen if one hit earth?