In Hinduism, Shesha is the king of all nagas (snakes) , one of the primal beings of creation, and according to the Bhagavata Purana, an avatar of the Supreme God known as Sankarshan.
In the Puranas, Shesha is said to hold all the planets of the Universe on his hoods and to constantly sing the glories of Vishnu from all his mouths. Therefore, referred as “Adishesha”, which means First snake.
Shesha is generally depicted with a massive form that floats coiled in space, or on the universal ocean, to form the bed on which Vishnu lies. Sometimes he is shown as five-headed or seven-headed, but more commonly as a many hundred-headed serpent, sometimes with each head wearing an ornate crown.
He is closely associated with Vishnu. His name means “that which remains”, from the Sanskrit root sis, because when the world is destroyed at the end of the kalpa, Shesha remains as he is. So he is referred as “Ananta-Shesha” which means “Endless Shesha”.
Lord Vishnu is seen resting on the coils of the serpent Shesha, also called Ananta. Sheshanaga serves the Lord in this way as the Lord’s support and paraphernalia. Shesha has a thousand heads swinging over the form of Lord Vishnu, creating a shelter and couch for the Lord.