This is a cutaway drawing of the proposed structure of Ganymede's interior.
Click on image for full size
As the formation of the planets came to an end, some planets as well as some moons turned inside out! That's right. With all the bombardment by leftover debris, the proto-planets and proto-moons warmed up. Elements which comprise the planets and moons will part into separate regions of the body, if the body is warm enough, thus forming layers in the interior of a planet as shown in this picture. This is the akin to the process whereby an oil & vinegar salad dressing will part into regions made solely of oil and solely of vinegar. The term for this process is differentiation
Differentiation is a scientific term which really means "to separate into layers". Planetary elements which separate include the heavy iron and the lighter silicate rock. Iron falls to the center of a planet and forms a core, silicate material might forms a mantle on top of the core.
This is page 21 of 60