It is reported on the authority of Ibn `Abbas that the Prophet (peace and blessings be upon him) said: “When prophet Ibrahim (peace and blessings be upon him) wanted to perform the Hajj rites, Satan blocked his way near `Aqabah. Ibrahim threw seven pebbles at him whereupon Satan sank into the ground. Again Satan appeared to him near the second Jamarah. Ibrahim threw seven pebbles at him and he again sank into the ground. Once again Satan approached him near the third Jamarat, and again Ibrahim threw seven pebbles at him and once again the Satan sank into the ground.” Ibn `Abbas added, “You throw pebbles at Satan, and (in doing so) you follow the path of your (great) forefather Ibrahim (peace and blessings be upon him).”
In his Ihya’ `Ulum Ad-Deen, Al-Ghazali says: “As to the throwing of the pebbles, it is an expression of the pilgrim’s intention to obey Allah’s commandment, and a demonstration of his humility and servitude to Him. It signifies compliance with the divine commandment without any trace therein of any selfish pleasure; sensuous or intellectual.” By throwing pebbles, one emulates Ibrahim when Satan blocked his way at that place in order to cast doubts in his heart or tempt him and divert him away from his Lord, so Allah commanded Ibrahim to drive the Satan away by throwing pebbles at him.
Therefore, if a Muslim is tempted to think that Satan appeared to Ibrahim and, therefore, he threw pebbles at him but we are not tempted by Satan so there is no need for us to throw these pebbles – if such a thought comes to you – then you must realize that this thought, itself, is from Satan. He suggests it to make you think there is no benefit in it and so weakens your resolve and prevents you from throwing the pebbles. Fight against these evil whispers with firmness, resolution and by throwing the pebbles despite these suggestions. You must also realize that although you are apparently throwing pebbles at the Jamarats, in reality you are hurling them in the face of Satan and thereby breaking his backbone. This is not possible except by submitting to the commandments of Allah, with submission to Him, and without seeking gratification of any personal desire.