How did lord Shiva of the Thrimoorthi get three eyes? Who gave him the third eye?
The third eye as seen on Lord Shiva's forehead is also the spiritual eye or ajna chakra which stands for higher consciousness and allows us to see the real world for the world as we see it is an illusion.
Hindus believe that every human possesses this 'third eye' which can be activated only after years of meditation.
Who gave him the third eye?
Shiva formed it himself.
According to Mahabharata, One day Shiva's wife Parvati, daughter of the King of Mountains, stealthily went behind Shiva and playfully placed her hands over his eyes. Suddenly darkness engulfed the whole world and all beings trembled in great fear as the lord of the universe had closed his eyes. Suddenly a massive eye of flame erupted from the forehead of Shiva; a third eye had appeared there and this gave light to the world.
However, this narration has a background to it. Shiva opened his third eye for the first time to set ablaze Kama, the God of desire when Kama tried to play cupid between Shiva and Parvati. Since then it has been said that third eye is meant only for destruction.
A detailed and plausible background to this narration is found here.
What does it signify?
Shiva’s third eye represents the rejection of desire. It is the eye that killed Kama. And why does Shiva reject desire? Because he realized the consequences of desire – when the object of desire (Sati) goes away, there is immense sorrow and rage. Desire not only evokes positive emotions (love, affection, contentment, compassion), it also evokes negative emotions (anger, dissatisfaction, sorrow). Shiva therefore shies away from it, preferring the cold still mountains which represent the state of transcendence – where there is just stillness, silence and bliss.
When Lord SadaShiva directly manifests from Sat-Asat state he comes with a form having three eyes:
परः पुमानीश्वरः स शिव शम्भुरनीश्वरः ।
शीर्षे मन्दाकिनीधारी भालचन्द्रस्त्रिलोचनः ।।
पञ्चवक्त्र प्रसन्नात्मा दशबाहुस्त्रिशुलधृक् ।
कर्पुरगौरः सुसितो भस्मोद्धुलितोविग्रहः ।।
Thereafter Parama Purusha Shiva also known as Ishwara having no Lord over him, who holds Mandakini on his head. He has three eyes and crescent moon on his forehead. He is five faced, a pleasent soul, holder of a trident, having complexion as white as camphor, keeps on applying white ashes over his body.
So, Lord SadaShiva manifests directly with form of Three-Eyes. It is also stated in Kaivalya Upanishad:
उमासहायं परमेश्वरं प्रभुं त्रिलोचनं नीलकण्ठं प्रशान्तम् ।
ध्यात्वा मुनिर्गच्छति भूतयोनिं समस्तसाक्षिं तमसः परस्तात् ॥ ७॥
Meditating on the highest Lord, allied to Uma, powerful, three-eyed, blue-necked, and tranquil, the holy man reaches Him who is the source of all, the witness of all and is beyond darkness.
Lord Rudra who is born from Lord Brahma also has three eyes as seen through description of Rudra in scriptures. Third Eye of Lord Rudra might be in invisible form also sometimes as seen from Mahabharata:
The beautiful Uma, with smiling lips and desirous of playing a jest,covered from behind, with her two beautiful hands, the eyes of Mahadeva. As soon as Mahadeva's eyes were thus covered, all the regions became dark and life seemed to be extinct everywhere in the universe. The Homa rites ceased. The universe became suddenly deprived of the sacred Vashat also. All living creatures became cheerless and filled with fear.
Indeed, when the eyes of the lord of all creatures were thus closed, the universe seemed to become sunless. Soon, however, that overspreading darkness disappeared. A mighty and blazing flame of fire emanated from Mahadeva's forehead. A third eye, resembling another sun, appeared (on it). That eye began to blaze forth like the Yuga-fire and began to consume that mountain. The large-eyed daughter of Himavat, beholding what occurred, bowed her head unto Mahadeva endued with that third eye which resembled a blazing fire.
As Lord has three eyes Lord is also called by the name Trayambaka in the Vedas. The significance of name Trayambaka is described in my answer here.
Three eyes represents the three forms or states. From Shiv Rahasya.
O you who are at peace! Reality or Truth is Eternally One, without a doubt. Yet in order to manifest Its Eternal Glory, Truth creates the various Worlds out of Itself. Therefore It exists in different States or Forms. They are: Spirit, which is like unto Fire; Energy, which is like unto the Sun; and Matter which is like unto the Moon. 2.7.
Lord's 3rd eye on forehead represents spirit ( individual consciousness) . And 1st & 2nd eyes energy & matter respectively. This has been confirmed in the same scripture.
The Lord was wearing a tiger skin, holding in His mighty hands a blazing trident and a drum, and having the Sun, Moon and Fire as three eyes. 4.19
- Fire is spirit (individual soul) here.
- Sun is energy.
- Moon matter.
Therefore, Lord Shiva having three eyes means he is holding spirit, energy & matter within himself. Thus, three eyes represents Lord Shiva as the ultimate reality.
This is one case, it is impossible to enumerate all cases in single answer. After few chapters, analogy is changed & third eye is explained in different way again as the eye of wisdom.
The Sleeping Soul is like the Moon and the Waking Soul like the Sun. The Moon which is the left eye shines by Night, far off from the Sun; and when the Sun, the right eye, rises, the Moon is gone. But when the Fire of Knowledge which is the Third Eye of Wisdom burns away both night and day, then Sun and Moon become one and are seen by no one. When neither Moon nor Sun are seen then the eye is not two-sided but one. By means of that Single Sight he who is one sees the True Man in the Sky. He, verily, beholds Truth as It Is. 5.5