While earth goes round the sun , similarly moon also goes round the earth. During the new moon night the side of moon facing earth is opposite of the side facing sun. They are not necessarily in same line. But, a situation arises when the sun , moon and earth remain one line. This causes the moon to fully or
partially blocks the Sun as viewed from earth. This is called solar eclipse.