What caused the dispute between the Pope and Henry 4, how did it end?

Henry the Fourth only continued the struggle begun by his predecessors against the papacy. The confrontation between the king and the pope is a power struggle. The pope, for his part, strove to control the secular life of the state, including dethroning objectionable monarchs. Henry the Fourth, as emperor, arrogated to himself the right to depose the popes. Pope Gregory the Seventh excommunicated the king from the Catholic Church and stripped him of the crown, and in response, Henry the Fourth appointed a new pope. Gathering an army from the Normans, the king sent them to Rome. The mercenaries captured and plundered the city. Pope Gregory the Seventh escaped and lived in a foreign land until his death. After many years of struggle, Henry the Fourth managed to firmly sit on the French throne. In 1610 he was killed by a Catholic fan.

One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.