Answer by taking a quote from the following article:

Al-Husayn ibn Ali ibn Abi Talib (Arabic: lHsyn bn 'ly bn 'by Tlb; 10 October 625 - 10 October 680) (3 Sha'aban AH 4 (in the ancient (intercalated) Arabic calendar) - 10 Muharram AH 61) (his name is also transliterated as Husayn ibn 'Ali, Husain, Hussain and Hussein), was a grandson of the Islamic Nabi (Arabic: nabiy, Prophet) Muhammad, and son of Ali ibn Abi Talib (the first Shia Imam and the fourth Rashid caliph of Sunni Islam), and Muhammad's daughter, Fatimah. He is an important figure in Islam as he was a member of the Bayt (Arabic: bayt, Household) of Muhammad, and Ahl al-Kisa' (Arabic: 'ahl lkisa, People of the Cloak), as well as being the third Shia Imam.

One of the important points of the treaty made between Al-Hasan and Mu'awiyah was that the latter should not designate anyone as his successor after his death. But after the death of Al-Hasan, Mu'awiyah, thinking that no one would be courageous enough to object to his decision as the caliph, designated his son Yazid as his successor in AD 680, breaking the treaty. Robert Payne quotes Mu'awiyah in History of Islam as telling his son Yazid to defeat Al-Husayn - because Mu'awiyah thought he was surely preparing an army against him - but to deal with him gently thereafter as Al-Husayn was a descendant of Muhammad, but to deal with 'Abd Allah ibn al-Zubair swiftly, as Mu'awiyah feared him the most. In April AD 680, Yazid succeeded his father as caliph. He immediately instructed the governor of Al-Medinah to compel Al-Husayn and few other prominent figures to give their Bay'ah (Arabic: bay'a@, Pledge of allegiance). Al-Husain, however, refrained from it, believing that Yazid was openly going against the teachings of Islam in public, and changing the sunnah (Arabic: sn@, deeds, sayings, etc.) of Muhammad. In his view the integrity and survival of the Islamic community depended on the re-establishment of the correct guidance. He, therefore, accompanied by his household, his sons, brothers, and the sons of Al-Hasan, left Al-Medinah to seek asylum in Mecca. While in Mecca, ibn al-Zubayr, Abdullah ibn Umar and Abdullah ibn Abbas advised Al-Husayn to make Mecca his base, and fight against Yazid from there. On the other hand, the people in Al-Kufah who were informed about Mu'awiyah's death sent letters urging Husayn to join them and pledge to support him against the Umayyads. Al-Husayn wrote back to them saying that he would send his cousin Muslim ibn Aqeel to report to him on the situation. If he found them united as their letters indicated he would speedily join them, because the Imam should act in accordance with the Qur'an, uphold justice, proclaim the truth, and dedicate himself to the cause of God. The mission of Muslim was initially successful, and, according to reports, 18,000 men pledged their allegiance. But the situation changed radically when Yazid appointed 'Ubayd Allah ibn Ziyad as the new governor of Al-Kufah, ordering him to deal severely with ibn 'Aqil. Before news of the adverse turn of events arrived in Mecca, Al-Husayn set out for Al-Kufah. On the way, Al-Husayn found that Muslim was killed in Al-Kufah. He broke the news to his supporters and informed them that people had deserted him. Then, he encouraged anyone who so wished, to leave freely without guilt. Most of those who had joined him at various stages on the way from Mecca now left him.

What happened
Yazid succeeded his father as caliph. He immediately instructed the governor of Al-Medinah to compel Al-Husayn and few other prominent figures to give their Bay'ah