This well proven hadith in Sunni school of thought Imam Trimdhi also wrote this hadith ” Ali is from and I am from Ali, He is the WALI (Master) of all believers.”
We can understanmd that The Holy Prophet said Ali is from because Imam Ali is the cousin of Holy Prophet and son in law who was raised in the hands of Holy Prophet but when the Holy Prophet said I am from Ali, this is not a light thing. It clearly means that after the HOly Prophet Imam Ali is the true picture of Prophet Mohammad (pbuh).
Bara ibn Aazib reported that the Prophet (SAW) said to Ali ibn Abu Talib, “You are from me, I am from you.”
Imam Tirmidhi quoted that this is Hassan Sahih Hadith.