You have to walk around the spikes, as you won't die from doing that, but if you jump on the spikes, you die.