The pastime of Lord Shiva's birth is described in Srimad-Bhagavatam (3.12.7-13): "Although Brahma tried to curb his anger, it came oaut from between his eyebrows, and a child of mixed blue and red was immediately generated. After his [Shiva's] birth, he began to cry: "O destiny maker [Brahma], teacher of the universe, kindly designate my name and place.". The all-powerful Brahma, born from the lotus flower, pacified the boy with gentle words, accepting his request, and said: Do not cry. I shall certainly do as you desire. Thereafter, Brahma said: "O chief of the demigods, you shall be called by the name Rudra by all people because you have anxiously cried. My dear boy, I have already selected the following places for your residence: the heart, the senses, the air of life, the sky, the air, the fire, the water, the earth, the sun, the moon, and austerity. My dear Rudra, you have eleven other names: Manyu, Manu, Mahinasa, Mahan, Shiva, Atadhvaja, Ugrareta, Bhava, Kala, Vamadeva, and Dhrtavrata. You also have eleven wives, called the Rudranis, and they are as follows: Dhi, Dhrti, Rasala, Uma, Niyut, Sarpi, Ila, Ambika, Iravati, Svadha, and Diksa.
Shiva is among the most widely worshiped deities in India. With names such as Mahadeva ("the great god") and Nataraja ("the king of dancers"), he is venerated in ancient holy cities like Benares, where Saivites (as his worshipers are called) devote their lives to him, viewing him as the Supreme Lord. The fact is, He is supreme. As the scriptures say, "Srimad-Bhagavatam is supreme among Puranas just as the Ganga is the greatest of all rivers, Lord Acyuta [Visnu] the best among deities, and Lord Sambhu [Shiva] the greatest among devotees of Lord Vishnu [vaisnavanam yatha sambhu]." (Srimad-Bhagavatam 12.13.16) According to this and similar statements, Shiva may correctly be considered the greatest at least among devotees but among gods the supreme is Vishnu. Shiva is superior to Brahma, who is an empowered soul (jiva), but Shiva is not quite on the same level as Visnu. It is therefore said that Shiva is a unique living being who merits his own category, known as Shiva-tattva.
Lord Shiva, also called Rudra, is the demigod in charge of the material mode of ignorance (tamo-guna), and he is in charge of destruction. He is worshiped by persons who are influenced by ignorance, and he supervises their activities.
“Rudra, who is an expansion of Sadashiva and who appears in unlimited universes, is also a gunavatara [qualitative incarnation] and is the ornament of all the demigods in the endless universes.” (Cc. Adi 6.79)
Thus, Lord Shiva is a demigod, albeit the best of them. Yet he also has another feature: He is a pure devotee of the Supreme Lord and the service and worship of pure devotees of Lord Krishna is most highly recommended for everyone:
“The service of the feet of pure devotees vanquishes one’s material distresses and enables one to develop transcendental ecstasy in the service of the Personality of Godhead, the unchangeable enemy of the Madhu demon.” (SB 3.7.19)