Hi Emily,
Actually the hottest part of the Sun is the outside (and yes, that's not like Earth). It is really unclear as to why that happens. Something is heating the outer layer of the Sun (the corona) and scientists are still trying to figure out how that works.
Best,
Christina