Hi Customer (name blocked for privacy)! Because the planets of our solar system rotate around the sun, sunlight reaches all the objects. The earth's and moon's distance from the sun prevent the earth from blocking all light except briefly when the earth ends up directly between the sun and moon (called a lunar eclipse). The moon itself does not shine. The reason we are able to see it in the sky is because the moon's surface reflects the sunlight.
Try taking a flashlight and placing two objects in a line in front of it. If you hold the flashlight very close to the first object, the light appears to be blocked from the second object. But, the further back you move the light source, the more spread out the light appears and begins to illuminate the second object as well. This is similar to what happens with sunlight.
Great question!