What causes sun to set?

Rotation of the Earth, with the sun going out of view.