House

A house is a structure that meets the following criteria:
 * Has side and back walls, a floor, and a ceiling. The back walls must be uniform, as two different wall types leave a small gap. You can cover this with blocks to allow for settlement, but otherwise NPCs won't move in.
 * Has a table and a chair.
 * Has a door in a wall or a Wood Platform in the ceiling or floor.
 * Has a light source.
 * Is at least 7 blocks wide and, not including walls, floor or ceiling.

To set the player spawn point using a bed, the size and wall requirements must be met.

An NPC requires a house to spawn. For an NPC to move in, the house must also be unoccupied. To forcefully move an NPC to another house, simply destroy any of the house requirements listed above (e.g. table) and make sure you have an unoccupied house available for the NPC to move in.