The Prophet (may Allah's peace and blessings be upon him) informs about the most wicked people; they are those who will be alive and witness the advent of the Hour, as well as those who take the graves as places of worship and pray at or towards them.
Lessons
Prohibition of building mosques over the graves, for it is a means that leads to Shirk (polytheism).
Prohibition of performing prayer at the graves, even if there is no building because "Masjid" (mosque) is a term that refers to the place where Sujūd (prostration) is made, even if there is no building.
Whoever takes the graves of the righteous as places of worship is counted among the most wicked people, even if he claims that his intention is to draw closer to Allah Almighty.
Explanation in Arabic
يُخْبِرُ النبيُّ صلى الله عليه وسلم عن شِرَار الناس، وأنهم مَن تقومُ الساعةُ عليهم وهم أحياءٌ، والذين يتَّخذون القبور مساجد، يُصَلُّون عندها وإليها.
تحريم بناء المساجد على القبور؛ لأنه وسيلةٌ إلى الشرك.
تحريم الصلاة عند القبور ولو بدون بناء؛ لأن المسجد اسم لما يسجد فيه ولو لم يكن فيه بناء.
مَن اتخذ قبورَ الصالحين مساجدَ للصلاة فيها فهو من شرار الخلق، وإنْ زعم أنَّ قصدَه التقرُّبُ إلى الله تعالى.
Scholars’ grades
Original grading term, without a named scholar: حسن