Hi Margo,
Rev 22:14 Blessed are those who do His commandments, that they may have the right to the tree of life, and may enter through the gates into the city.
Starting with verse 14 we can see this is speaking of the Elect. It tells us what this city is back in chapter 21 verse 2 "the holy city, New Jerusalem, coming down out of heaven from God." Go down to 21:27 and we see who are in the city "only those who are written in the Lamb's Book of Life," the Elect.
So this is the time of the "new heaven and a new earth" (Rev 21:1) and this city "New Jerusalem" is explained back in Rev. 3.
Rev 3:11 Behold, I am coming quickly! Hold fast what you have, that no one may take your crown.
v. 12 He who overcomes, I will make him a pillar in the temple of My God, and he shall go out no more. I will write on him the name of My God and the name of the city of My God, the New Jerusalem, which comes down out of heaven from My God. And I will write on him My new name.
"New Jerusalem" is the kingdom of God, this is those who will rule with Christ in this "new heaven and a new earth." Now the verse you were asking about.
Rev 22:15 But outside are dogs and sorcerers and sexually immoral and murderers and idolaters, and whoever loves and practices a lie.
This verse is speaking about all those from the resurrected of the dead and have not yet been cleansed and purged. These are those that were cast into the lake of fire on the "new earth," and of course are "outside" the kingdom/new Jerusalem. Here is a passage that kind of summarizes this "new earth."
Rev 21:22 And I saw no temple in the city, for its temple is the Lord God the Almighty and the Lamb.
v. 23 And the city has no need of sun or moon to shine upon it, for the glory of God is its light, and its lamp is the Lamb.
v. 24 By its light shall the nations walk; and the kings of the earth shall bring their glory into it,
v. 25 and its gates shall never be shut by day--and there shall be no night there;
v. 26 they shall bring into it the glory and the honor of the nations.
v. 27 But nothing unclean shall enter it, nor any one who practices abomination or falsehood, but only those who are written in the Lamb's book of life.
Hope this helps.
mercy, peace and love
Kat