I am Pope Gregory IV and I can remove the king, appoint bishops, and have supreme power over all rulers.
Charlemagne was a devout Christian King and he ruled after Roman rule collapsed in Europe. He set out to improve the Church, he ordered priests, nuns, and monks to live by church rules, scholars edited texts to create a library of Christian texts. He was King, but he wanted more, he wanted the title of Emperor.
I am King, this i my kingdom not yours!
One day Charlemagne was visited by Pope Leo III, and he needed his protection. The following year he traveled to Rome to see the Pope and the Pope crowned him Emperor. His coronation strengthened the power of the Western Church and made it so only Popes could crown kings, but in Eastern Europe they saw this as an insult.
You are all free!
It all changed in 1073, when Pope Gregory IV came to be. He issued a full list of rules and declared his supreme power over both church and secular leaders. He said he alone could appoint bishops and he could remove Emperors.
Now we have both signed, we will live in harmony
A conflict between Pope Gregory and King Henry arose. Pope Gregory wanted power, but King Henry was not going to give up his position so easily, so they began to fight. It started with King Henry ignoring Pope Gregory's rules and appointing his own bishop.
So, Pope Gregory began to try to upset King Henry until he gave in. Pope Gregory excommunicated King Henry, which means he could not partake in Church activities. Then, Pope Gregory freed all of King Henry's peoples from their oaths of loyalty to him.
Eventually, Pope Gregory and King Henry both died, but the battle between Popes and Kings still continued. In 1122, the Concordat of Worms was signed, fixing most of the issues. It allowed the church to appoint bishops but allowed the King to bribe the bishops with fiefs of land for their loyalty.