The end of the Tribulation (24:21 to 23)
Verse 21 states that " the host of exalted ones " (the devil and demons) and "on the earth the kings of the earth" (humanity) will be punished by the Lord.
Verse 22 makes it clear that all will first be imprisoned, but in two different places: the "pit" and the "prison":
The "pit" refers to Hell, " or eternal fire" , where the fallen humanity, unregenerate, unsaved, will be placed after the second coming of Christ. This is the judgment described in Matthew 25: 31-46 and Joel 3: 1-3.
The "prison" is for the fallen angels (Revelation 12: 9). It is the "abyss", a part of Sheol or Hades , a temporary place of imprisonment that was destined for them. The devil will be released there with them as per Revelation 20: 1-3.
All these will be punished "after many days ", ie after the end of the millennium, when it will be submitted to the judgment of the " great white throne ": "... And whosoever was not found written in the book of life, was cast into the lake of fire " (Revelation 20:11 15).
At the end of the Great Tribulation, Christ's kingdom will be established. Reigning at its headquarters on Mount Zion and Jerusalem, the glory of the Lord of hosts will overcome the brightness of the moon and sun, thus manifesting before His elders.
21 It shall come to pass in that day that the LORD will punish on high the host of exalted ones, And on the earth the kings of the earth.
22 They will be gathered together, as prisoners are gathered in the pit, and will be shut up in the prison; after many days they will be punished.
Isa 24:23 Then the moon will be disgraced And the sun ashamed; For the LORD of hosts will reign on Mount Zion and in Jerusalem and before His elders, gloriously.
Isaiah chapter 21 to 23