After Pope Gregory XI died , the italian cardinals elected the italian archbishop as Pope Urban VI. He wanted to reform the curia, the corrupt papal court.
The French cardinals wanted to return the papacy to Avignon so they elected Pope Clement VII, a cousin of the supportive french King Charles V.
Pope Urban VI - supported by England and its allies (Holy Roman Empire, Hungary, Bohemia, and Poland)
Pope Clement VII - supported by France and its allies (Naples, Scotland, Castile, and Aragon)
At the Council of Pisa a new pope was elected: Alexander V. The other two popes did not agree to step down even after most of Western Europe believed that Alexander was the legitimate pope.
After a couple of years and new succeeding popes, the Council of Constance was called by Emperor Sigismund. The dispute over the popes had to be solved and it resulted in one Pope - Martin V.
This ended the Great Schism