Peter refused to to accept Jesus's prediction of suffering and death, and Jesus scolds Pet as tis is seen as an attempt to deflect Jesus from his God appointed course. Jesus refers to Peter as Satan and an obstacle in his path.
There are many obstacles in our way on the path to our God appointed course. What we may see as a boulder, God sees as a pebble. We need to stop thinking as humans and move past the obstacles. Greed, sloth, envy, wrath, pride, lust and gluttony are just a few obstacles Satan has put in our way to watch us fail. In verse 24, Jesus says
"Whoever wishes to come after me must deny himself, take up his cross, and follow me. For whoever wishes to save his life will lose it, but whoever loses his life for my sake will find it."
The notes in my bible says "to deny oneself is to disown oneself as the center of one's existence." Again, we need to stop thinking as humans do. Stop putting ourselves first. We cannot lose our life for Jesus if our life is focused around ourselves. Literally this would be martyrdom, dying for believing in Jesus. But spirutually, physically, and figuratively, I think this is letting go of ourselves, or needs, wants, possessions here on earth and follow Jesus will provide for our life with him in heaven. If we choose to stay on path where is is self centered, to save our life, we will forfeit our life in heaven because we will loose our soul and connection with Jesus here on earth.