The Infinite Dungeon (ID) is truly infinite for all practical purposes. The level number is limited by some 32 or 64 bit integer value, but who really cares about that? It would take many lifetimes to descend through all its levels, even assuming a PC could survive such a trip, which is impossible. The danger level increases with dungeon level; any level greater than 200 or so becomes ridiculous.
Every dungeon level is randomly generated, so leaving a level and reentering it results in a completely new dungeon level. The ID has some unique characteristics: shops, altars and pools are never generated. Artifacts are never generated on the floor with a "Surge of power" message. Dragons (not baby dragons), ancient dragons and wyrms can drop artifacts when killed. If an artifact on the floor is left behind when leaving a level, it will jump in to the PC's pack before the level is exited. If a monster has picked up an artifact before the level is exited, the artifact is lost. Note that monsters cannot pick up sis and Chaos Orbs.
White unicorns, pets and slaves left in the ID will rejoin the PC in a wilderness encounter after exiting. Filk exhibits the same behavior.
There is a special level, the SIL, where MaLaKaI resides. It is not part of the ID, but can only be accessed (once) from it. See 2.25.2 below.
According to the Mad Minstrel, the ID was originally a monument built by the powers of law. The incursion of Chaos into Ancardia has twisted it into its current condition.
Stair-hopping (thanks to gut for this section):
Stair hopping is the process of repeatedly ascending and descending a single staircase in the ID, for the purpose of generating hordes of items in the continuously generated rooms. Items generated on the ID's floors will be of a danger level equal to 1/3 of the ID's dungeon level. That means only DL1 items will be generated on ID levels 1-3. On ID levels 4-6, DL2 items can be generated, and DL3 items can be generated on ID levels 7-10. This applies to dipping items into potions of raw chaos and exchange as well. This does not apply to guaranteed drops, like eternium gear from chaos warriors. Also, it seems that this does not always apply to monster generation either.
Benefits of stair hopping include: An easy way to acquire spellbooks, as they are all DL1, and thus available on ID levels 1-3. An easy way to acquire extra DV/PV points for the early game, as shields, hats, gauntlets, boots, etc... can sometimes have nice stats. An easy source of teleport control (actually the only guaranteed source of TP control in the game), as blink dogs can be found after ID 4 (sometimes earlier). An easy way to acquire potions and scrolls that can save a PC's life.
Filk is found in the ID on the level corresponding to the number of first-killed monsters killed. For example if the first monster killed was a rat and 225 rats have been killed, Filk will be found on I: 225. Filk is a quickling bard and the fastest quickling in the game with a speed of 1500. His DV/PV is 500/0. He shares the properties of karmics although he is not named as such. If a player generates Filk but does not kill him, he will eventually join the PC in a wilderness encounter. More about obtaining the Filk quest is found in section 184.108.40.206.
MaLaKaI resides in the SIL, found at about level 66 of the ID. He is a chaos knight and guards the Sceptre of Chaos. The SIL is not really part of the ID. It is discovered by descending through the ID normally, but once left, it can never be found again. This means if a PC needs the Sceptre of Chaos, there is only one chance to get it, so be prepared. MaLaKaI is quite tough. He is designed to be an opponent for characters above level 40. He has a corrupting melee attack. He cannot see in Darkness and is vulnerable to humanoid and demon slayers.
Conclusive proof that the SIL is not part of the ID is the fact that altars are sometimes generated in the SIL. These can come in very handy since MaLaKaI can be sacrificed.