The moon's rising and setting occur at different times every night due to the moon's changing position in its orbit. When the moon is full, for instance, it is directly opposite the sun, causing it to rise at sunset and set at daybreak.
The changing phases of the moon are caused by its relative position to the sun, and this affects when the moon rises and sets. The new moon occurs when the moon is on the same side of the Earth as the sun, causing it to rise and fall with the sun. Quarter moons, on the other hand, spend half their time in night skies and half in the daytime.