What causes the phases of the moon?

a
As the Moon moves around Earth, different portions are illuminated.
b
It is closer to the Earth at times and further from Earth at other times.
c
The effect of gravity