which one of earth's layers has the hottest temperature? why?

http://www.scientificamerican.com/article/why-is-the-earths-core-so/