A bed can be slept in. Doing so moves the world clock forward by eight in-game hours.
Approach a bed inside one of these places and use the Sleep action:
A bed anywhere else offers no action at all. A cot placed at a camp or a FOB works the same way, and costs 30 to build.
The screen fades to black, holds for a moment, then fades back in on the new time of day. Sleeping does not skip events. Every event that would happen while you stayed awake still happens, in the same order.
A notification for each of these events appears while the screen is black. It stays on screen once the screen clears.
After you wake, you must wait twelve in-game hours before you sleep again. The cooldown starts at the moment you wake, not at the moment you lie down. Count the eight hours you spent asleep, and a full twenty in-game hours pass from one sleep to the next. The bed shows the time left in its action label while the cooldown runs.
Two things disable the Sleep action, and each shows its own reason on the bed: an attack on a resistance base, or a wanted level on you. Outside a valid sleeping location, the game does not offer the action at all.
Sleeping is a single-player feature. A multiplayer session never offers the Sleep action, on any bed.