Head right until a spider unfurls its legs in front of you. It will take an early jab at you, which you should dodge. You must then lure further attacks so that the spider slams its legs into the ground twice. It will raise a leg, hovering it over your head, before drawing it back to strike. You should be able to avoid the attacks with relative ease.
Once two attacks have missed into the ground, a trap will have fallen down behind you. Head left and jump over it, before pushing it towards the spider. You must now lure further attacks, but instead of running off to avoid it, pull the trap back so that the spider's legs hit it instead of you. Beware though, you should let go of the trap before the attack hits, as the spider can lash out immediately after losing a leg (particularly after the second one) to take a life from your character.
Take out three of the spider's legs to send it limping away.
Force the spider to retreat
Head right and you will slide down a slope. Continue right until you are stopped by some slime, reducing your character's movement. The spider will make a return, spinning you into a web. Wriggle free and scamper further to the right. Your movement is restricted due to the web, so when you reach the small gap in the level, be sure to jump it carefully.