The diameter of the Sun's core is twenty-seven times the diameter of the Earth and has a temperature of fifteen million degrees.
The cores of the rocky planets are made of metal. For example, the cores of the Earth and Mercury are made of iron. The cores of the gas giants are made of rocks.
Small moons may not have cores because they are just lumps of space rock. Our Moon has a core made from iron and sulphur.