Hadith 929
Abu Hurairah (May Allah be pleased with him) reported:
عن أبي هريرة رضي الله عنه قال: قال رسول الله صلى الله عليه وسلم : “من شهد الجنازة حتي يصلى عليها، فله قيراط ، ومن شهدها حتي تدفن، فله قيراطان" قيل: وما القيراطان؟ قال: “مثل الجبلين العظيمين” ((متفق عليه)) .
The Messenger of Allah (ﷺ) said, "Whoever follows the funeral procession and offers the funeral prayer for it, will get a reward equal to one Qirat, and whoever attends it till burial, will get a reward equal to two Qirat.'' It was asked, "What are two Qirat?'' He (ﷺ) replied, "Equal to two huge mountains." [Al-Bukhari and Muslim].
In plain words
Following a funeral and praying over the deceased earns a great reward, and staying until the burial earns double, each portion likened by the Prophet to a huge mountain.
Reference : Riyad as-Salihin 929 In-book reference : Book 6, Hadith 36