Some text from Minecraft Wiki used under Creative Commons Attribution-Share Alike License 3.0
Health Points | 16HP (8x ) |
Attack Strength | Heart |
Drops | 0-3 String on death 0-1 Spider Eye when killed by the player |
Spawn | Light level that is less than 7, on solids. |
Spiders move slightly faster than other hostile mobs. They are extremely aggressive and will perform a leap attack at the player when close enough. They make a very audible sound similar to a loud hissing. Unlike the other mobs that spawn during the night, spiders have the ability to see through every block, which is the common cause of why spiders are a frequent danger to players. This and their unique climbing skill is an extreme risk to being active during the night (especially in a shelter, where spiders can sneak onto the roof in order to reach the player).
Due to their climbing abilities, roofs are imperative when creating a shelter. Players can counter this ability, however, by creating overhangs around their buildings, preventing the Spider from climbing over. Spiders that appear during the day will become neutral and will not attack the player unless attacked. On rare occasions, Skeletons can be seen riding a spider, creating a Spider Jockey . Despite this combination, they are still separate enemies with their own weaknesses.
On harder difficulties, spiders may spawn naturally with randomly generated potion effects active.
Spiders can resolve to be irritating creatures during the first few days of a map in Survival. Players who do not acquire supplies fast enough may be left without a roof, which is the main drive of a spider that attacks within a player's home. An easy way to combat this is to use any supplies to build an overhang, which does not require corners and can be kept until a roof is fully built.
Spiders can be difficult enemies to combat during night (due to their dark hue, sometimes the only way to differentiate a spider between darkness is its glowing, red eyes), so it is best advised to wait until day, as spiders will be neutral during the day-light. It is also to be noted that spiders are best tackled with a Bow as they will not become hostile towards the player if they are at least 10 or more blocks away in distance.
If combated from a short range, attacking from one block below is an efficient strategy. Spiders only deal damage when their Y axis position is changed. When the player is at the same level as a spider, they are less likely to be hit. This will also give the player a straight shot towards a spider and provides more accuracy against their erratic movements. If you are not prepared for a battle and have nothing but a sword, axe or even just an item (which deals damage,not like snowballs or eggs) or your fist, you can try to kill the spider by hitting whenever it comes near you. But make sure there are no other hostile mobs around that could distract you.If you fail, like when the spider attacks you from an unfortunate angle and your health points is very low, retreat by sprinting and getting out of the spiders reach!
.To make a wall that spiders can not climb over try putting a fence with any type of slab on top. It is considered either a glitch or a bug, but it works.
Once a spider leaps into you, you jump while walking backwards then attack and repeat this technique.
See here