The Z-Machine is a virtual machine originally developed for the game Zork and used to develop interactive fiction (also known as text adventures). Written in 1979 by Joel Berez and Marc Blank (two of the founders of Infocom), it allowed Infocom to easily port its games to multiple systems, as only the Z-Machine interpreter itself needed to be re-written for each system.
At Infocom, games were written in their in-house language ZIL (Zork Implementation Language). A compiler called Zilch would then compile to ZCode, which could be run on one of the various Z-Machine interpreters. Zilch was never released outside of Infocom. However, in 1993 Graham Nelson released Inform, an interactive fiction design system that also compiled to ZCode. Inform is one of the most popular tools of the modern interactive fiction community.
Z-Code interpreters have been written for a wide range of systems, from the original Infocom interpreters on the Apple II, TRS-80, Sinclair, Atari 800, Mac, PC, and Commodore 64 to new systems such as the Gameboy (via homebrew) and Palm OS. They have even been made playable via IRC or the web.
Several other virtual machine based game systems exist, such as LucasArts's SCUMM (used originally for Maniac Mansion) or the interactive fiction alternative, Glulx.