This is the bonus mission in the second HUB world. To unlock this you need to travel to the 3rd world for the first time and beat the 2nd boss on the level 'Spikes Arena'.
After you've done this you can travel back to the second HUB world anytime and this mission will be unlocked for you, just go visit the Sparx sign near the back of the level, it would have said "Come back later" beforehand when you interacted with it.
So the actual mission itself isn't too bad, the keys you find in the level de-activate the electric barriers. Work your way through the level and eventually you will get to the last area with the Spider King.
To defeat the Spider King you must shoot him at the same time he is shooting out his mini spiders at you. You can't do damage to him whilst he is spinning. So keep destroying his minis and when he shoots out more, get as many shots on him as you can. Rinse and repeat until you kill him.