Salam alaikum
In brief, the Shia believe that Ali was appointed by the Prophet (s) as his successor on the day of Ghadeer Khumm, on the way back from the Hajj. Here is an example of a typical narrative:
"Traveling with the Messenger of Allah [s], we stopped at the pond of Khumm and the Prophet [s] sent someone to call upon people to gather. When we came together he said: ‘Do I not have more right with you than your own selves?’ We said: ‘Yes indeed, O Messenger of Allah!’ He continued: ‘Do I not have more right with you than your mothers?’ We said: ‘Yes indeed, O Messenger of Allah!’ He continued: ‘Do I not have more right with you than your fathers?’ We replied: ‘Yes indeed, O Messenger of Allah!’ He kept asking ‘Do I not have’, and we kept answering ‘Yes indeed, O Messenger of Allah!’ He concluded: ‘To whoever I am his master, ‘Ali is his master. O’ God, love those who love him, and be hostile to those who are hostile to him.’ 'Umar b. al-Khattab said: ‘Congratulations O Ibn Abi Talib, today you have become the master of every believer.’ "
Source:
Ibn Katheer, al-Bidaaya wa’n-Nihaaya
Cairo: Matba’at al-Sa’aada (14 vols), 1932- volume 7, page 349
Note: I have pasted this translation from the web, though al-Bidaaya’s portion on the seerah is also available in English, and I can type up what the translator (Le Gassick) has got there if it helps.
My understanding is that whereas the Shia translate the word “mawla” as “master”, the Sunni’s prefer “friend”. I would like to understand how the event makes sense with such an interpretation.