During Hajj Pilgrimage, after returning from Mount Arafat, pilgrims make way to Muzdalifah, a place between Arafat and Mina. There they collect pebbles for the stoning ritual that is to take place the next day
At Mina people throw stones on three pillars, Jamarah, symbolising their rejection of temptation instigated by Satan, thrice. It is in fact the act of defying the devil against its evil temptations. The practice, during Hajj pilgrimage, to stone the walls by pilgrims, (which is why) to commemorate the incident of the devil, Satan, attempting thrice to induce Ibrahim from sacrificing his son, in obedience to God's command.
This Hajj ritual is an enactment of Ibrahim's pilgrimage to Mecca. When Ibrahim left Mina and was brought to a defile called, al-Aqaba, the devil or Satan appeared to him at a stone-heap of the Defile. Gabriel, urged him to pelt the devil with stones in order to defy it. Ibrahim followed the angel's advice and threw seven stones at the devil, which vanished immediately.
The devil, for the second time, appeared at the middle stone-heap, when Gabriel again urged Ibrahim to pelt it with stones, which, Ibrahim immediately followed, by throwing seven stones.
For the third time, the devil made its appearance at the little Stone-heap, and Ibrahim urged by Gabriel shoved the devil by throwing seven small stones at it.
The symbolic significance is that, the first appearance of the devil, is the temptation of sacrificing his son, in accordance with God's command.
The second appearance of the devil, marks the temptation of Hagar, Ibrahim's wife against the sacrifice of their son.
The third appearance, signifies the temptation of Ismail, Ibrahim's son from getting sacrificed.
The stoning of the devil, symbolises man shunning his lower desires, directing his steps to attain closeness to Allah; this spiritual significance is the reason as to why pilgrims stone the walls, during Hajj pilgrimage.