Neptune is composed mostly of ice, hydrogen and helium. It may have a small, rocky core, and an icy mantle that blends into the atmosphere.
Neptune radiates almost three times as much heat energy as it gets from the distant Sun. Some of this excess heat is probably left over from the formation of this planet and some is generated by the slow collapse of the surface because of the planet’s own gravitational forces.