How do spiders protect themselves?

Spiders are frequently camouflaged, and they may hide in burrows or other refuges. Many spiders come out after it gets dark and hide during the daylight hours. Some spiders use brilliant color schemes that may intend for birds and other predators to associate them with poisonous or venomous creatures that warn off predators. So spiders have many passive kinds of protection.

Spiders do not have stingers, but they do have sharp fangs, and almost all spiders have venom. The toxicity of most venoms is too low to bother humans much, but some spiders are dangerous enough to kill humans and even larger animals. Spiders generally prefer not to waste venom biting predators, so they first try to escape and/or make a threat display. If a spider is surprised it may not have time to do anything but bite.

Some tarantulas also can shed hairs that work about like fiberglass insulation to make predators smart and itch. These spiders may make a threat display, scrape off itching hairs and flick them at their enemies, try to run away, and only bite when these methods fail.
Go and find a spider try to attack it , you should see how they protect themselves.