When the Prophet ﷺ performed the ritual bath after major impurity, he would begin by washing his hands, then perform ablution as he did for prayer. Next, he would dip his fingers into the water and run them through the roots of his hair, then pour three handfuls of water over his head, and finally let the water flow over his entire body.
أخبرنا قتيبة عن مالك عن هشام بن عروة عن أبيه
أن النبي ﷺ كان إذا اغتسل من الجنابة بدأ فغسل يديه ثم توضأ كما يتوضأ للصلاة ثم يدخل أصابعه الماء فيخلل بها أصول شعره ثم يصب على رأسه ثلاث غرف ثم يفيض الماء على جسده كله
Bukhari narrated it in "ghusl," chapter "wudu before ghusl," no. 248, from the hadith of Malik through the same chain, and it is in Muwatta (Yahya): 1/44, and in the Kubra, no. 246. Muslim also narrated it in "Hayd," chapter "the manner of ghusl for janaba," no. 316, as did Bukhari and others, through routes from Hisham with the same chain.