Think of molecules as objects attached to one another with springs. They’re jiggling about a little bit, and the hotter they are, the more they jiggle. More jiggling = can stretch the springs more = spread out more = expands. The “springs” in these case are the weak forces between molecules, like the Van Der Waal force.
The core of the Sun is a totally different matter that involves a different kind of physics. The core of the Sun is hot because certain types of reactions that release huge amounts of energy only work in places where things are extremely close together. Those reactions aren’t on the level of molecules or whole atoms, but rather on the level of atomic nuclei (the Sun is too hot for full atoms to exist there, even at its surface).
Latest Answers