The Messenger of Allah (ﷺ) said: Going round the House (the Ka'bah), running between as-Safa and lapidation of the pillars are meant for the remembrance of Allah.
Sunan Abi Dawud Book 11, Hadith 168