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.