The Shiites believed that Ali of Muhammad’s cousin and son in law should be the leader.
The Sunni’s believed that Abu Bakr, his father in law, to be the leader.
They had to choose a new leader as Muhammad died in 632CE and they were attempting to decide their new ruler, soon leading to a division on who they would choose.
Hope this helps!