To expand a bit, when the Shia-Sunni split happened, it wasn’t really about “Shias” or “Sunnis”, since neither of those groups as we know them today really existed. What happened was, as ñañi indicated, a political-religious struggle over who would lead the Muslim community, the ummah as the divinely-appointed successor (khalīfah) to Muhammad. When Muhammad died, there was a faction that felt only the members of the family of the Prophet, the Ahl al-Bayṫ, were chosen by God to be Caliphs - specifically, his son-in-law and cousin ʿAlī ibn Abī Ṭālib. Muhammad’s father-in-law Abū Bakr was chosen instead, though, and he and was in turn succeeded by Umar ibn Al-Khattāb, and then ʻUthmān ibn ʻAffān.
It wasn’t until ʻUthmān was assassinated in an uprising that ʿAlī became Caliph. However, a rift arose between the associates and relatives of ʻUthmān who felt that he was unjustly and wrongly killed and ʿAlī should crack down on the rebels of the uprising that murdered him, and the supporters of ʿAlī (who were known as the shi’at Alī, the partisans of Alī) who felt that ʻUthmān was an illegitimate ruler and the rebels were right to overthrow and kill him so that God’s appointed successor to the Prophet, ʿAlī, could take his rightful position as Caliph. Some of the ʻUthmān faction, led in part by Abū Bakr’s daughter (and Muhammad’s widow) ‘Ā’isha bint Abī Bakr, engaged in their own armed revolt against ʿAlī, and were defeated by the shi’at Alī at the Battle of the Camel. To this day, the Shias bear a particular animosity towards ‘Ā’isha for her role in the revolt.
This did not end the challenges to ʿAlī’s rule - the governor of Syria, ʻUthmān’s cousin Muʿāwiyah, also led his armies against the Caliph. ʿAlī was unable to defeat him, and as Muʿāwiyah’s forces conquered city after city, ʿAlī’s power base fell apart, and he himself was assassinated.
Up to this point, all factions (even the shi’at Alī) agreed that everyone who had been Caliph so far was a legitimate and proper appointed successor to Muhammad (what are called the rāshidūn, or rightly-guided, Caliphs). What resulted after Muʿāwiyah’s revolt and claiming of the Caliphate as the first Umayyad Caliph, however, was a major rift in the ummah. The shi’at Alī (who became known as the Shias) held that Muʿāwiyah was not a legitimate Caliph, that the “true” Caliphate had passed down to Alī’s son Hasan (Muhammad’s grandson) as the fifth Caliph. The rest of the ummah supported Muʿāwiyah as the rightful fifth Caliph.
This rift deepened after Muʿāwiyah forced Hasan to abdicate but Hasan’s brother Husayn refused to pledge allegiance to Muʿāwiyah’s son 'Yazīd (who had succeeded his father as Umayyad Caliph). Husayn’s army was defeated by 'Yazīd’s army at the Battle of Karbala, and Husayn and all his followers were executed. The Martyrdom of Husayn at the hands of the Umayyad 'Yazīd is still today commemorated by Shias as the Day of Ashura.
The supporters of the victorious Umayyad dynasty would later go on to be the Ahl al-Sunnah, the “people of tradition” that are today called Sunni Muslims. The Shias, however, still rejected as illegitimate all of the Sunni Caliphs - for them, the true successor to Muhammad continued to be the members of the Ahl al-Bayṫ (after Husayn, embodied in Husayn’s son Alī’). Since the Shia “Caliph” had no political power, the role became an explicitly religious one - the Shia successors (called Imāms) were seen as much more like the Prophet they succeeded than the more temporal rulers that the Sunni Caliphs evolved into. Shia Imāms, as divinely selected direct successors to Muhammad, were seen as not just ruling the community, but were the only ones capable of properly interpreting the Qur’an and ahadith, and could even create their own sunnah by serving as exemplars for the community to follow just as Muhammad did, due to their unique ability to serve as as conduit between God and humanity (though they weren’t Prophets proper). Since this directly conflicted with both the role of Sunni religious scholars as the gatekeepers of religious interpretations and establishing the laws that Muslims must follow, as well as still essentially challenging Sunni leadership (in the form of who deserved to be Caliph) and were therefore subject to numerous religious and temporal persecutions, the Shia became a mostly reserved quietist movement, giving Shia Islam a distinct inward-looking spiritual flavor that differed from Sunni Islam.
The above mainly applies to Twelver Shia Islam (which the majority of Iranians follow and which can be said to be “mainstream” Shia Islam). Even the Shia couldn’t avoid further internal divisions, however - there are several subsects of Shia Islam, differing based on who they consider to be legitimate Imāms. The Ismāʿīlis who ruled Fatimid Egypt, for instance, are called Seveners, because they believe that Ismāʿīl ibn Ja‘far was the Seventh Imām, while Twelvers believe that the true Seventh Imam was Ismāʿīl’s brother Mûsâ ibn Ja‘far. Even then, there are offshoots of offshoots - a modern subset of Ismāʿīlism, the Nizaris, not only differ from the Twelvers on who the Seventh Imām was, they differ from the Twelvers in not believing that the line of Imāms came to an end with the twelfth Imām (which is why Twelvers are called Twelvers…they believe the twelfth Imām did not die but merely disappeared - the “Occultation” - and will return during the End Times), but instead continued on to the present day, with the current, 49th Imām being Prince Shah Karim Al Hussaini Aga Khan IV.