How does a spitting cobra use its spit to protect itself?

It uses its "spit", or venom, to paralyse other animals that are attacking or threatening it. For example, if a fox were to approach the spitting cobra, the cobra will spit at the fox to keep it away. This keeps the cobra safe and protected from the fox.