حَتَّىٰ إِذَا فُتِحَتْ يَأْجُوجُ وَمَأْجُوجُ وَهُم مِّن كُلِّ حَدَبٍ يَنسِلُونَ (Until when the Ya'juj and Ma'juj (Gog and Magog) are released, while they run down from every height - 21:96.) In the previous verse it was said that those who died in a state of unbelief will never return to this world. The phrase "until the Ya'juj and Ma'juj appear", really means that such people will never return, because the appearance of Ya'juj and Ma'juj will be a sign of near approach of the Dooms Day.
It is reported in Sahih of Muslim through Sayyidna Hudhaifah ؓ that he and some other Sahabah ؓ ، were in the midst of a discussion when the Holy Prophet ﷺ came to them and enquired as to what were they deliberating. They replied that they were discussing about the Qiyamah (Dooms Day). Thereupon he said that Qiyamah will occur only after ten signs have become manifest, and the appearance of Ya'juj and Ma'juj will be one of them.
Here the word فُتِحَت (released) is used for Ya'juj Ma'juj which means to let loose, which suggests that until the appointed time they will remain under restraint and confined behind some barrier from which they will be released when Doomsday is near. It is evident from the Holy Qur'an that this restraint is the wall made by Dhulqarnain which will disappear near the Qiyamah. Ya'juj and Ma’ juj and Dhulqarnain have been described in fair detail in Surah Al-Kahf, to which the reader may refer.
مِّن كُلِّ حَدَبٍ يَنسِلُونَ (while they run down from every height - 21:96) The word حَدَبٍ 'means an elevated place which may be a mountain or just a lump in the ground. We have also seen in Surah Al-Kahf that the place where Ya’ juj and Ma'juj have been confined is somewhere beyond the northern mountains. So when they will come out, they will be seen rushing down the mountain sides in their hordes.