In all of his images, Lord Shiva is shown wearing a garland of the cobra. It definitely looks impressive, but let us try to understand, what is the underlying meaning of that cobra. There are multiple interpretations of this cobra.
Some say that this cobra represents the ego that Lord Shiva has controlled. Others say that since the cobra is curled around his neck, it represents the cycle of birth and death, while many others say that the cobra represents evil in this universe, which lord Shiva is protecting us from.
Now these are all very good interpretations and you can definitely use them in your prayers if that is what resonates with you, but I would like to give you a more profound understanding of this cobra. So to understand this more profoundly I would use the reference of the logo of Ramakrishna Mission.
Now if you look at the log of Ramakrishna Mission, it has a swan, a lotus, a lake, and a rising sun and all of that is encircled inside a snake. So when asked about the snake, Swami Vivekananda, he said that the snake over here represents the concentration and so what I think is that the snake that is shown on lord Shiva is actually representing that same concentration.
So you know that this snake is always shown in its attacking position with its hood raised up and he forms this hood to remove distractions from around him and then he just attacks. So this is a very one-pointed concentrated position that the snake has.
He is totally unaware of his surroundings and he is just concentrating on his one target and that is what the snake is representing in all the images of Shiva. Now lets did a little deeper into this idea of concentration.
Lord Shiva sits in the state of Samadhi for long periods of time, now when a person is in Samadhi, all is attention is withdrawn from the external world and is focused on his object of meditation. A person who is in Samadhi is completely unaware of what is happening in his surroundings.
If you start playing very loud music close to them, they will not listen to it. If you throw water on them, they generally will not feel anything and so this person who is in Samadhi, his whole attention is towards his object of meditation.
This is the highest level of existence as been said in our texts and to attain it we need very strong concentration. So that is what this idea of concentration is. If you are a devotee of Shiva then you should appreciate that this world has a lot of distractions, but you as a devotee of Shiva have to withdraw yourself from all these distractions and put all your attention to just one thing.
So you should not really be distracted by any other thing. You should do everything that you are doing in your life with the fullest amount of concentration. So that is what this idea of cobra is actually representing.