Spider is a hostile mob that resides in the forest biome. While weaker than the Wolf in terms of health and attack damage, it is much faster. Its special ability is to trap players and make them can't move for 2-3 seconds in its web (AKA webbing), allowing it to catch up and deal heavy damage. Because of this ability, one should only attempt to fight a spider with weapons.
An emergency way to escape a spider is to put an obstacle between you, forcing the A.I. to de-aggro and leave. This tactic also lets you hit a spider with a spear behind a wall without taking damage (if you stay there it continues to aggro).
Avoid getting in trouble with a spider and a wolf at the same time, if the spider traps you, the wolf and the spider can hit you for 2 seconds at least, and you will probably die without a good protection and technique.