All of the earth’s matter was drawn together by gravity, or the force of attraction between two objects.
Gravity is, of course, what usually keeps your feet on the ground and makes you fall when you trip over your shoelaces. Scientists are not exactly sure how the matter came together to form a solid Earth. One theory is that the heavier particles, metals like iron and nickel, sank to the center, while lighter material remained on the outside.
Another theory is that the heaviest particles clumped together first, then attracted the lighter material. Either way, this whirling clump of matter was held in orbit by the strength of the Sun’s gravity.