"Satan" is a Hebrew word (שָׂטָן - śā·ṭān) meaning "Adversary" (see, e.g., Numbers 22:22), usually used though as a proper name of the devil (e.g. Job 1:6 etc.).
Peter is called "Satan" here because he sets himself as an adversary to Jesus, opposing the will of God. He is even called a skandalon (NIV offense) - an obstacle or "stumbling block".
The Apostles had been taught to always pray that God's will be done (Matthew 6:10). Jesus had also taught the Apostles that whoever was not with Him was against Him (Matthew 12:30, Luke 11:23). Peter, however, as the verse states, had not the things of God (NIV concerns of God), but rather the things of man in mind.
One might be tempted to excuse Peter's ignorance that it was God's will for Jesus to suffer and die, but he had just been told this clearly and directly by Jesus (v.21). Nor can Peter be excused for not understanding that what Jesus said must happen must reflect the divine will, since he (Peter) himself had just affirmed that Jesus was the Son of the living God (v.16), and even received praise for this (v.17).
Exactly why Jesus needed to suffer and be killed is a different and important question. But I do not think this other question needs to be considered in order to logically answer the question you pose.