Although we intuitively discover great differences between solid, liquid or gaseous objects, they are fundamentally the same thing: only differs in the behavior of the molecules that make them up.
Everything was gas
For that reason, with sufficient heat, all the elements of the periodic table can theoretically become gas, no matter how solid they may be. If we apply a little heat, they will first become liquid. And later, After applying more heat, it will become gaseous.
And the process also works in reverse: if a gas is removed from heat, we can turn it into a liquid. And if we remove even more heat, then a solid will form.
The differences between solids, gases and liquids, then, is the movement of the molecules. The molecules of a solid have fixed positions and can barely move. Those of liquids still touch and rub, but have more freedom to slide. Gas molecules are wild, they rarely rub against each other ... well, they do much less than in a solid.
Faced with what has been said before, we can better understand that the Earth was not always solid: it used to be a gas.
Sam Kean he explains it more graphically in his recent book The last breath of Caesar when talking about gases:
And when the molecules of a gas meet, they collide and bounce in new directions, like in a chaotic 3D pool game. A typical molecule of air at 22 ºC and buzzing at one thousand six hundred kilometers per hour.