Ali was cousin and son-in-law to Muhammad twice over, raised by him since he was five, and was according to tradition the second person to accept Islam. This all sounds nice but since Muhammad had no sons it became of vital importance after Muhammad died and people had to figure out who was to succeed him. Ali became the fourth caliph in 656. In a disputed sort of way. It did not help that his biggest supporters were the ones who had assassinated the third caliph, Uthman. Although to give him his due, Ali initially turned down the caliphate when the assassins offered it to him.
Ali did not reign long. He ruled over the first civil war in Islam, when followers of Uthman declared his leadership illegitimate. Though he won the war Ali never had control of all the Muslim world. This will be important later. Ali did not get to enjoy his ascendency for long: he was assassinated by poisoned sword in 661 in Cairo by a man from the losing side of the civil war. His son Hasan was immediately declared caliph. But followers of Uthman were able to weaken Hasan’s position, because they had still had lands and armies at their command when Ali died, and they did a good job of bribing Hasan’s generals. A few months after Ali’s assassination, Hasan realized the impossibility of his position and abdicated. The followers of Uthman then set up the Ummayad Caliphate, the first political system after Muhammad run by men who were in no way descendants of Muhammad.
Unsurprisingly, the Ummayads continued to state Ali’s time as caliph was illegitimate, harassed Ali’s family, and required Ali to be publicly cursed in congregations’ prayers. This was bad handling of a delicate situation. It led many to be more sympathetic to Ali and to remember his rule more fondly. So Ali’s death eventually brought about the biggest split in Islam: between Shi’a who view Ali and descendants of the house of Muhammad as the only true rulers of the Muslim faithful, and Sunni who viewed political legitimacy as separate from family descent.
Today the vast majority of Muslims (87% - 90%) are Sunni. But throughout history, who is Shi’a or Sunni, and what territories they control, have mattered very much.