The Reformation of the 16th Century involved the efforts of reformers such as Martin Luther, John Calvin, John Knox, and even Henry VIII, in questioning the religious authority of the Catholic Church. This Lutheran Reformation was so-called because of the 95 theses posted to the door of a Wittenberg Church by the inimitable monk. In this document, Martin Luther questioned the teachings of the Catholic Church regarding matters of salvation, the sale of indulgences, and the doctrines on penance.
Charles V, the Holy Roman Emperor (1519-1556), was well known for his antagonism to the Protestant/Lutheran Reformation. He worked tirelessly to make the convention at the Council Of Trent a reality, and his efforts paid off beautifully in the establishment of the Catholic Counter-Reformation. Charles also supported the formation of the Society of Jesus (Jesuits) by St. Ignatius of Loyola for the purposes of combating what he perceived as the dangers of the Lutheran Reformation.
The two popes most involved in the Protestant Reformation during the reign of Charles V were Clement VII (pope from 1523-1534) and Paul III (pope from 1534-1549; the first pope of the Counter-Reformation). Charles V had an uneasy relationship with both.
During the reign of Pope Clement VII, Europe was in the throes of a power struggle between Charles V of the Holy Roman Empire and Francis I of France. Clement's support wavered between the two kings; he was first and foremost, a prince of the Renaissance, more interested in personal advancement and the indulgence of decadent pleasures than a vague religious struggle he personally found irrelevant. Charles V's efforts to convene a council for the purposes of combating the advances of the Lutheran Reformation met with no support from this pope.
In contrast, Charles V had more support from Paul III, the pope widely considered to be the first pontiff of the Counter-Reformation. Paul III had also brought back many of the lavish traditions involving the reception of princes; these opulent ceremonies greatly benefited Charles V. However, like his predecessor, Clement VII, Paul III experienced great difficulty in inspiring Charles V to cease his never-ending wars with Francis I of France. Despite this insubordination, Paul III's purposes for the Catholic Church aligned with Charles V's.
Paul III was the pope who convened the Council at Trent on Dec 13, 1545. In due time, he was also to prove his own courage in parting ways with the Emperor on matters of religious reform. Paul III was adamant that the Council dealt with doctrinal issues, while the Emperor insisted that the Church was better served in mainly concentrating on issues of reform and discipline. Despite this disagreement, Pope Paul III was able to make substantial progress in documenting new Church policy on original sin, the sacraments, as well as decrees on the canon of the Scriptures. This first pope of the Counter-Reformation saw the emergence of the Jesuits and the Roman Inquisition, both developments supported by Charles V.
Read about other popes of the Counter-Reformation here.
One of these popes, Pius V, lost no time in making sure the decrees of the Council of Trent were carried out to the letter. His zeal for reform and for religious battle was unmatched by any of the other popes who succeeded him. Indeed, it was Pius V who threatened the Holy Roman Emperor, Maximilian II, with ex-communication, if the Emperor could not reign in his tendency to make concessions to Protestants in Germany.
As you can see, each Pope and Roman Emperor battled not just for supremacy in secular matters, but also in religious matters during the Lutheran Reformation. This tendency to wrestle for personal ascendancy often meant the Catholic struggle for religious dominance, influence, and relevance often became unnecessarily embroiled in the kind of drama best reserved for theatrical productions.