A shelter is basically a Blockhead's home, a place that it is safe from the elements.
Shelters can be simple as a little underground bunker meeting basic needs or as complicated as a five-story golden palace with diamond chandeliers.
A shelter needs light in it, a roof made of blocks, a wall behind it, and either sufficient distance from open sky or blocks acting as side walls to count as a shelter or the inhabiting Blockhead's environment meter will go down due to the lack of light or occurrence of rain. A source of heat (campfire or other crafting surface that requires fuel) may also be needed in some climates. Doors or other barriers will keep dropbears from attacking at night and can serve as parts of side walls.
While the various crafting surfaces do not have to be kept inside a shelter, it's typical for them to be located there.