Allah has told us that Hell has seven gates, as He (SWT) said: “And surely, Hell is the promised place for them all. It [Hell] has seven gates, for each of these gates is a [special] class [of sinners] assigned“. (15:43-44)

Ibn Katheer commenting on this ayah, said: “This means that each gate has been allotted its share of the followers of Iblees who will enter it, and they will not be able to avoid it. May Allah (SWT) protect us from it. Each will enter a gate according to his deeds, and will be assigned to a level of Hell according to his deeds.”

It was reported from ‘Ali ibn Abi Taalib (ra) that he said, during a khutbah (sermon): “The gates of Hell are such-and-such”. Abu Harun said, “They are in layers, one above the other”. It is reported that he also said, “The gates of Hell number seven, one above the other. The first will be filled, then the second, then the third, until all of them are filled.” (Tafseer Ibn Katheer, 4/162)

When the disbelievers come to Hell, its gates will be opened, and they will enter it, to remain there forever:

“And those who disbelieved will be driven to Hell in groups, till, when they reach it, the gates thereof will be opened [suddenly like a prison at the arrival of the prisoners]. And its keepers will say, “Did not the Messengers come to you from yourselves – reciting to you the Verses of your Rabb, and warning you of the Meeting of this Day of yours”. They will say, “Yes” but the Word of torment has been justified against the disbelievers“. (39:71)

After they are admitted, they will be told:
Enter you the gates of Hell, to abide therein. And [indeed] what an evil abode of the arrogant!(39:72)

These gates will be shut upon the evildoers, and they will have no hope of ever escaping from them after that, as Allah (SWT) says, “But those who reject Our Signs, they are the [unhappy] Companions of the Left Hand. On them will be Fire vaulted over [all round].(90:19-20)

Ibn ‘Abbaas said, “vaulted” (literally: “shut over them”) means that the gates will be locked”. al-Mujaahid pointed out that the word used (mu’sadah) is the word used in the dialect of Quraysh to mean “locked” or shut” (Tafseer Ibn Katheer 7/298)

In the Qur’an Allah (SWT) says:
Woe to every [kind of] scandalmonger and backbiter, who piles up wealth and lays it by. Thinking that his wealth would make him last forever! By no means! He will be sure to be thrown into that which Breaks to Pieces. And what will explain to you that which breaks to pieces? The Fire of [the wrath of] Allah, kindled [to a blaze], which mounts [right] to the heart. It shall be made into a vault over them, in columns outstretched.” (104:1-9)

Allah (SWT) states that the gates of Hell will be locked behind them. Ibn Abbaas said, “In columns outstretched” means that the gates will be stretched out”. ‘Atiyah said, “It is a pillar of iron”. Muqaatil said, “The gates will be closed firmly behind them and locked with a bolt of iron so that the pain and heat will be intensified. The expression “stretched forth” applies to the “pillar”, meaning that the bolts with which the gates are locked will be very long because a long bolt is stronger than a short one” (Ibn Rajab, at-Takhweef min an-Naar, p.61)

The gates of Hell may be opened and closed before the Day of Judgement. The Prophet (Saw) told us that the gates of Hell are locked during the month of Ramadhan. at-Tirmidhi reported that Abu Hurayrah said the Prophet (saw) said: “When the first night of Ramadhan comes, the Shayaateen and evil jinns are chained up. The gates of Hell are closed and not one of them is opened. The gates of Paradise are opened and not one of them is closed.” (Ibid, p.66)