He cannot die. The only way to defeat him is to drop him into the water. Hit the block in the upper-left hand corner to activate a switch nearby & press it. This will cause the red ball on the left to disappear. Then, step on the block in the bottom-right corner of the square area Magma is standing on (try not to hit him) to activate another switch nearby & hit that one to make the right one disappear. The fireballs & flames will go out & the platform he is on will slowly crumble away until he falls into the water and dies.