the earth was created by stars. when close by stars blew up, the star dust scattered about. than the star dust fused with rock, and sediments, and "space junk" scientist call it that.
so overtime, it forms another a planet like object, it collects more rock, and sediments, and starts to rotate, faster and faster, when more rock and sediments attach it smooths out because of the gravity. think of it like poetry, spinning on the wheel.
so overtime it keeps going, and our planets forms an atmosphere. the first ever rain lasted years, filling up oceans. lakes. rivers. salt rose from rocks at the bottom, and thats why we have salt water
grass started growing, trees started growing.
no body can know 100% how the earth came about, but ehh thats the best i can do to explain.