The word or name Satan means resister. Devil means slanderer. Thus this angel turned demon is called Satan the Devil, or Resister the Slanderer.
Peter was called resister (Satan) because he was suggesting that Jesus "resist" God's will and not carry it out. Although Peter meant well, it was a serious misstep. In suggesting that Jesus resist God's will, Peter was imitating Satan who made the same suggestion to the first couple in the Garden of Eden. They succumbed. Jesus recognized the suggestion for what it really was and immediately rejected it, at the same time, rebuking Peter for it. Peter needed an immediate attitude adjustment, which he made.