Is Shiva a demigod or a different type of entity? What is his role?
Hare Krishna. Thanks for your question.
Lord Shiva is in a unique position. He is a demigod, but not an ordinary one. He is a tattva (category of being) of his own. His loka ("planet" or "world"), Kalilash, is not annihilated when the material manifestation is annihilated.
Lord Shiva is compared to yogurt and Lord Krishna to milk. Lord Brahma, in his Brahma Samhita, makes this comparison. By adding some culture to milk, one makes yogurt. Both come from the same substance, yet are slightly different in quality. Milk, or Vishnu, is the source. Such is the relationship between Lord Shiva and Lord Krishna!
Lord Krishna (Vishnu) is responsible for the maintenance of the material and spiritual worlds. Lord Shiva is responsible for the destruction of the material world. He is also in charge of the tamas (ignorance) mode, although he personally is unaffected by it. Lord Shiva is constantly in meditation on Lord Vishnu and is extremely powerful and full of good qualities. He's easily pleased by service and devotion to him, but he's most pleased when his followers direct their ultimate worship to Lord Vishnu.
I'd suggest you read the story of Daksha in the fourth Canto of the Srimad Bhagavatam; there you'll get a good understanding of the power and majesty of Lord Shiva.
I hope this is helpful.