Thanks for answers, everyone. And yes, this is what I meant - normal, domestic mail (sorry for not being clear).Short answer: It depends on where they are, what you're sending, and what they've got as a "mailbox", as the US Postal Service is pretty reliable on the delivery aspect of things.
Long answer: If you're asking about residential mailboxes, those are generally unlocked and can be placed right beside the front door of the residence, or classically, near the sidewalk (but technically still on the property) for the mailperson to come by, put the letter in, and go on their way. There's no requirement for a name to be on the mailbox for correspondence to be received-- anything addressed to that location will end up there, whether it's letters, gift parcels, promotional material (store circulars, flyers, brochures), etc. When mail is sent to a recipient that no longer lives at the address, returning it is as simple as writing "UNKNOWN" or "UNK" on the envelope and putting it back in the mailbox. The mailperson will pick the correspondence back up the very next day and it'll be returned to the sender or whatever else the postal service does with it.
Unlawfully possessing someone else's correspondence is 100% a federal crime under the US Code, quoted thus:
On the rare occasion someone's accidentally received someone's mail, the proper way to handle it is noted above: write "UNK" on the envelope or otherwise personally go to the nearest postal office to explain that the person no longer lives at that location. Sometimes misplacement isn't that gross and the mail in someone's box actually belongs to the neighbor just next door. In which case, we just leave it in their box or personally hand it to them.
Then there are the integrated "hole in the door" mail slots that therogis mentioned, but parcels of a certain size can't fit through those, so they're only good for protecting, well, envelope-sized mail. Anything bigger than the slot will be left at the doorstep or sent to an Authorized Service Center for pickup if not a second attempt at delivery, detailed below.
For areas that don't have a door-to-door mail service or recipients that don't want certain things to be sent directly to their house for whatever reason, they can rent out private mailboxes owned by the postal service and located right in the premises. PO Boxes obviously have a finite amount of space but there are different sizes available, with a key to access it and everything. In the event of interstate or international parcel delivery, they can't handle Direct-to-PO-Box shipping since they're not authorized to put anything in the recipient's name or in their box; they literally don't have the keys to get to it. That's resolved by letting the US Postal Service handle the "last leg" of the delivery, making them responsible for the package, and they put the mail in for the recipient to pick up. Or in the case of the United Parcel Service, they have Authorized Service Centers (storefronts or actual warehouses) to serve as the final destination for mail, that the recipient picks up. And they have to provide verification. And the person at the Authorized Service Center has to scan the barcode on the parcel to confirm pickup, get the receipt signed, etc.
I mean, it's a really involved process.
But I'm guessing you meant just regular mail like letters and stuff.
In the UK, almost everyone has a letterbox (the hole in the door) and anything that doesn't fit is either placed in a designated safe place (chosen by the recipient), or else taken back to the post office and kept for a limited amount of time to be collected. If it remains unclaimed, it gets returned to the sender.
The idea of an unlocked container for correspondence that can be accessed by anyone is something I'm not sure I can fully get my head around. So there's NOTHING stopping someone from stealing out of them? Is it just a sort of trust/honour thing where people just wouldn't even dare?
I know this is all a bit weird, but it's something I've genuinely wondered about for ages.