In Genesis 14, Melchizedek, the king of Salem, brought out bread and wine for Abraham after he successfully defeated the raiders and retrieved back all the goods, Lot and his possessions and others. To pay homage to Melchizedek, Abram gave him 1/10 of everything.
In Hebrews 7, Melchizedek is compared to Jesus. The descendants of Levi only hold the priestly office for temporary but Melchizedek resembling, the son of God, becomes a priest forvver. He is so great that even Abraham offered him 10% of the spoils he had taken from the enemies.
The king of Salem, Melchizedek, is compared to Jesus Christ, because his name means the king of peace and he probably govern his kingdom peaceably. This is similar to Jesus Christ, who is also known as the Prince of Peace. His kingdom is a kingdom of peace; his people are sons of peace; and he bears the good news, gospel of peace.
Melchizedek was a priest, not because he inherited this position from his lineage, like the Levites. There is no record on the birth and death of Melchizedek, like Jesus Christ, the God man, who existed from the beginning and will live forever.
Jesus Christ is a priest forever, not after the order of Levi, as he was not a descendant of Levi. Instead, Jesus Christ is a priest after the order of Melchizedek. Melek means king and Sedek means righteousness so Melchizedek is king of righteousness.
Unlike the previous priests in the Old Testament, Jesus Christ will serve as a priest and mediator between God and men forever. Anyone who believe in Jesus Christ and draw near to God through him can be saved and enter into the kingdom of heaven. Jesus Christ had offered up himself on the cross for the sins of the people in the whole world once and for all. Therefore, there is no need for him to offer daily sacrifices for himself and the people like the high priests.
For in that he died, he died unto sin once: but in that he liveth, he liveth unto God. (Romans 6:10 KJV)
For Christ also hath once suffered for sins, the just for the unjust, that he might bring us to God, being put to death in the flesh, but quickened by the Spirit. (1 Peter 3:18 KJV)
By the which will we are sanctified through the offering of the body of Jesus Christ once for all. (Hebrews 10:10 KJV)
I am the living bread which came down from heaven: if any man eat of this bread, he shall live for ever: and the bread that I will give is my flesh, which I will give for the life of the world. (John 6:51 KJV)
And for their sakes I sanctify myself, that they also might be sanctified through the truth. (John 17:19 KJV)
Be ye therefore followers of God, as dear children; 2And walk in love, as Christ also hath loved us, and hath given himself for us an offering and a sacrifice to God for a sweetsmelling savour. (Ephesians 5:1-2 KJV)
For both he that sanctifieth and they who are sanctified are all of one: for which cause he is not ashamed to call them brethren, (Hebrews 2:11 KJV)
Forasmuch then as the children are partakers of flesh and blood, he also himself likewise took part of the same; that through death he might destroy him that had the power of death, that is, the devil; (Hebrews 2:14 KJV)