Could someone explain to how the ID works, and how to get out of it once you descend past the first level?
The Infinite Dungeon is just like any other dungeon, except the floors are generated again each time you enter them. (Okay, a little more different than that, but...) If you're in past the first floor, just continue to the Up stairwell each time, and you'll arrive on the surface. The floors aren't "set" after generated like the other dungeons; you can continue through and get a new level each time. So you won't remember a floor once you leave it.