The Distribution
After the churning of the great ocean, the nectar of immortality — amrita — had emerged. The asuras and devas both wanted it. Vishnu took the form of Mohini — a form of incomparable beauty — and offered to distribute it equally.
The asuras, enchanted, agreed. The devas sat in one row, the asuras in another.
Mohini served the devas, moving slowly, keeping the asuras' attention.
The Deception
One asura — Svarbhanu — changed his form to resemble a deva. He sat quietly in the row of gods and received the nectar. He drank.
The Sun and Moon were watching. They recognized him. They told Vishnu.
Vishnu threw his Sudarshana Chakra. It severed the asura's head from his neck.
But the nectar had already touched his lips and throat. The head did not die. The body did not die.
The head became Rahu. The body became Ketu. Both immortal, both furious.
The Eclipses
Rahu and Ketu — the head and the headless body — have held a grudge against the Sun and Moon since that day. At certain alignments, they swallow the Sun or the Moon.
But they cannot hold them — having no complete body, they release the sun and moon shortly after.
That is what an eclipse is.