King Henry VIII (1491–1547) of England took the throne after the death of his father, Henry VII, becoming second in the line of Tudor monarchs. Henry was only eighteen at the time he took the throne, so in the early years, the state was dominated by Cardinal Wolsey (ca. 1473–1530), who operated from his position as Lord Chancellor. Wolsey fell out of favor with Henry owing to the former's failure to mediate an agreement with the papacy over the issue of Henry's marriage to Catherine of Aragon. Henry sought an annulment of his marriage from Pope Clement VII, so he could marry Anne Boleyn. Henry struggled to produce a male heir and may have believed that it was God's punishment for having taken as a wife his brother's widow. Catherine had previously been married to Henry's older brother Arthur. Clement refused to grant an annulment, which led Henry to issue the Act of Supremacy (1534).
The Act of Supremacy established the Church of England as an entity independent of the papacy and Henry as the head of the Church. Subsequently, the kings (and queens) of England would serve as the heads of the Church of England.
In other words, Henry challenged the papacy owing to his desire to marry Anne Boleyn. Were there other factors? Henry certainly stood to gain politically in some ways by becoming his own pope, so to speak. The notion of the divine right of kings in England is usually traced to Henry's rule. The king was elevated to a loftier position than ever before and his rule became more absolute.
The religious pendulum swung back and forth for some time before England settled into its Anglicanism. Henry's son from Anne Boleyn became Edward VI (r. 1547–53). He launched Protestantizing reforms, which included the secularization of church property, the dissolution of monasteries, the institution of clerical marriage, and the introduction of the Book of Common Prayer. Edward died of tuberculosis in 1553. Queen Mary (r. 1553–58), daughter of Henry VIII and Catherine, restored Catholicism. She voided Edward's reforms and launched a persecution of religious opponents. Hundreds of gentlemen, clerics, and students fled to continental Europe. Three hundred Protestants were tried by church courts and executed by “Bloody Mary.” Then Elizabeth I (r. 1558–1603), daughter of Henry and Anne, regarded a bastard by the Catholic Church, with no right to the throne, issued a New Act of Supremacy (1559). The Catholic priesthood was criminalized, one hundred and eighty Catholics were executed for treason. At this point, England settled into its Anglicanism.