Here's a breakdown:
* Planets: Planets orbit stars, and they are illuminated by the light from that star. We see them because they reflect a portion of that starlight back towards us.
* Moons: Moons orbit planets, and they are illuminated by the light from the planet they orbit. So, our Moon shines because it reflects sunlight that has first been reflected off the Earth.
This is why planets and moons appear dimmer than stars, even though they are much closer to us. They are simply reflecting light, not producing their own.