Spider

Spiders are common neutral mobs that have the unique ability to climb walls.

Natural generation
Spiders spawn in 3x3x2 space on solid blocks (centered on the middle block) at a light level of 7 or less. The top blocks can be transparent, but not solid.

In Pocket Edition, leaves can spawn spiders, provided that there are the same conditions as above.

Monster spawners
Monster spawners in dungeons have a 25% chance of being a spider spawner.

Behavior
A spider measures 1.5 x 1.5 x 1 blocks of size.

Spiders are hostile as long as the light level immediately around them is 9 or less; otherwise they won't attack unless a player attacks first. Hostile spiders will continue to chase the player even if they are exposed to well-lit locations. Conversely, a spider won't become hostile around a player when roaming in high light, but if it wanders into a moderately shaded area it will turn hostile and remain that way. If a spider sustains damage from a source other than the player, such as falling, its hostility will be reset.

Spiders can climb up over walls and other obstacles. If the spider is chasing the player, and there is a possible horizontal path that it can take to get to the player, they will immediately take it, regardless of the situation. However, if the spider cannot find an ideal path to the player in this condition (when a player goes behind or on top of a wall), it will get as close as it can to the player's position from the outside or below, and proceed to climb the wall vertically until it gets to the top, even if it loses its aggression towards the player. This behavior allows spiders to continue chasing players after they climb a ladder, block pillar, or enter a shelter, especially with no roof. Additionally, when a spider loses its aggression on the player, it will continue moving forward blindly for about two seconds. This behavior causes the spider to climb up any walls in its path, and is especially useful if the player did not hit the spider at all while moving into cover, causing the spider to lose track of the player.

Spiders do not turn sideways when climbing up walls and cannot climb along the tops of ceilings. If there are blocks around the top of a wall, a spider will not be able to climb to the top and will instead fall.

Like most mobs, Spiders seem to be oblivious to cactus damage.

While not poisonous themselves, spiders are unaffected by poison status effect.

Spiders will often jump around when attacking, making them a moving target and harder to hit, although they will deal no damage while in midair.

In the Pocket Edition, spiders move at a pace slightly slower than the player's walking speed.

Variants
There is a 1% chance that a spider will spawn with a skeleton on its back, forming a spider jockey.

On hard difficulty, spiders have up to a 10% chance (depending on regional difficulty) of spawning with a single beneficial status effect. This effect can be speed (40%), strength (20%), regeneration (20%) or invisibility (20%), and has an essentially infinite duration.

Drops
Spiders drop 0-2 string. If killed by a player or tamed wolf, it also has a $1/3$ chance to drop a spider eye. They drop 5 experience when killed by a player or tamed wolf.

Trivia

 * You can still see a spider's eyes when it is hit with a potion of invisibility. This is because they have a separate texture file for eyes, like endermen.
 * A spider can jump sideways or backwards.
 * At close range, spiders occasionally pounce their attackers instead of being knocked back.
 * If the water a spider is swimming in is only 1 block deep, they may pounce nearby enemies upon touching the submerged floor.
 * Spiders do a flip and land on their backs when they die, unlike most mobs (which land on their sides).