According to this legend, Simon Magus wanted to prove his pagan powers were greater than those of the apostles, and started levitating in front of Peter. The apostle fell on his knees to prayer, asking God to demonstrate his pre-eminence, and Simon fell, dying.
This legend tells of Simon Magus attempting to show he was more powerful than the apostles by levitation in front of Peter.  Peter prayed for divine intervention to demonstrate his own authority, and Simon fell and died as a result.