The ecliptic – the line across our sky defined by the sun's path – gets its name from the fact that eclipses can only occur along it. A lunar eclipse happens when the moon passes through Earth's shadow, when it is directly opposite the sun on the sky.