Overall meaning :
Allah Almighty states that the idolaters who ascribe partners to Him in His divinity should not construct or tend the mosques of Allah, nor worship in them while they admit that they are unbelievers. All their works will bear no fruit whatsoever, and they will dwell in Hellfire for all eternity.
He further mentions that only those who believe in Allah, the resurrection and the Day of Judgement, and who duly perform the prescribed prayers, pay the prescribed zakat to those entitled to it and fear none but Allah can visit and tend the Mosques of Allah. It is these who are on true guidance leading to Paradise.
Allah Almighty then says: Do you consider, O people, those who provide drinking water to pilgrims and tend and maintain the Sacred Mosque equal to those who believe in Allah and the Day of Judgement and fight for Allah’s cause? They are by no means equal in the sight of Allah, and Allah does not grace with His guidance people who do wrong.