King Henry VIII created the Church of England in 1536 as a result of a dispute with the pope, who would not permit Henry to get a divorce from his wife and marry his long-time mistress. Henry's marital history started under a cloud of suspicion, as his marriage to Catherine of Aragon meant he was forming a union with his brother's widow. Whether his series of divorces was actually the result of his failure to produce a male heir or some other form of instability is a matter of some dispute, but the reason for forming the Anglican Church was to give Henry the right to act as the head of his own church and marry as he pleased.
When Henry VIII started the Church of England, Roman Catholicism was already roiling under the effects of Reformation, which started in 1517 as the German Lutheran church began a separation of its own. Henry irritated the Catholic establishment even further, not just by separating from Catholicism but also by funding the first translation of the Bible into English.
Henry's decision to establish the Church of England was far from the last word in British religion. The country was governed by Catholic and Anglican monarchs -- and even a Puritan protectorate under Oliver Cromwell -- until William of Orange took over the throne and left the Church of England's role intact in 1688.