Beds

The Bed is a piece of Furniture you can set your spawn to, which can be useful if your house isn't near your spawn. Once a bed has been placed you can right-click it to set its location as your new spawn point.

Beds act as an NPC in terms of requirements to place, therefore you cannot place them in the wild. You have to create a hut that is liveable (side and back walls, light source, doors to enter. Table/Chairs not necessary) in order to plant a bed which makes it useful as a check for a room to see if it is viable for NPC habitat.