A spawn jail is a player-created structure that can be built on multiplayer servers that traps newly spawned players. It can be used as a security check for new arrivals, or as a server lock for when there are no operators online.
In recent versions of the game, the spawn in multiplayer servers spans a large region of space (possibly 17x17) and so building spawn jails is more difficult. It can still be done by determining the spawn area and building a floor and walls out of bedrock.
Rarely, servers create a closed box that has no windows or gaps so they cannot see outside. Sometimes they spawn in a dark room with mobs.
New arrivals spawn inside the box and cannot escape until released by an operator. If there are no operators or administrators inside the room, the spawn jail effectively closes the server, meaning no one can enter when the room is not managed. This is an anti-griefing measure: each new arrival feels scrutinized, may be followed once allowed out, and knows that the room is policed, purportedly making them less likely to grief. The viewing window can yield whether or not the player is a premium owner of Minecraft–a demographic who are not expected to be griefers due to their monetary commitment to the game.
Sometimes, a spawn jail is more of a "spawn maze" where a maze built of bedrock starts at the spawn point and acts as an intelligence test for new arrivals; they must find the end of the maze in order to access the room properly. Maze generators can be found on the internet.
Some servers may have an entire section fenced off by bedrock. This is so the admins can let players on the server when no admins are online. It may also provide more selective server entrance policies, only letting those with good building talent or a premium membership in.
Some players consider this a rude practice, and that it defeats the point of a server being public or free-build. However, many server admins believe that it helps prevent their server against griefers greatly, and therefore support it. It also helps if a player is known to not be a griefer, in which case an admin can let them out.
The effectiveness of this for griefing reduction is debatable.
In Classic, if spawn jails are larger than one square block, then it is possible to break out of it. This does not work in later versions of Minecraft. Simply by pressing ↵ Enter, moving aside, then placing a block at the place you pressed enter, will get you out of the spawn jail (by pressing R to respawn). Fortunately, most servers ban people who build in spawn jails. Using cheats can also allow you to break out of a spawn jail, where this is also frowned upon.
This problem can be fixed by creating a net of 1x1x2 rooms that the players move up into when they try to escape. Since a room like this would have no viewing window it would leave people who try to escape stuck and would need to rejoin.
If there is a room with bedrock as a ceiling, it would also be better to put the spawn jail at the top. When a player respawns and there is a block on top of the spawning point, that player will be transported over the top of the map, trapping him, and will have to rejoin. Unfortunately, if the player places the block at the spawn block, anyone else who joins will be stuck. Also, note that this method would only work with cave maps or closed underwater maps. The jail buildings with iron bars are optional.