The reason we have sand is because of something called erosion. Erosion refers to surfaces that get worn away by forces like water or wind.
Sand comes from the erosion of boulders, mountains, cliffs and other surfaces. Waves, wind, and other natural forces wear away at the rock and break them into smaller pieces of rock. Over time, the smaller pieces of rock break into smaller and smaller pieces until eventually you get sand!
To get to the beach, these small pieces of rock usually travel by water. They wash into rivers and streams and eventually splash up on shore! Some sand, especially at the beach, can also come from other eroded items, like small pieces of crushed shells.
Of course, sand doesn't only appear at the beach -- there is sand in the desert, too! Desert sand also comes from the erosion of other larger surfaces like mountains and cliffs, but since there isn't any water washing up on shore in the desert, the sand usually arrives by the wind, instead!
Next time you go to the beach, pick up a handful of sand and look at it more closely.
Is there anything you can see in the sand to indicate where it might have come from? Does it look more like it might have been rock or broken shells? Maybe both? Different beaches often have sand of different colors. Think about the color of the sand and other sand colors that you've seen. What do you think might have caused the difference in shade??