The local equivalent of FedEx comes and buzzes your room. If you're not there, they walk over to the locker, which explains its operation (though they've been here before and know it already):
a) Type in the room number.
b) Our machine will pick a door to pop open.
c) Place your package over the sensor in the middle of the locker. Close the door.
d) We'll print you a receipt.
The user-facing process is pretty simple, too: the control unit has a list of rooms with packages available. If you're on the list, you punch in your room number, hit Go, punch in your PIN (set up for you when you moved in), hit Go, and the appropriate doors pop open. You remove the package and close the door.
This machine costs, my guesstimate, $4k and takes up approximately 15 ~ 20 sq feet of floor space to service an apartment building with ~50 doors.
(If you want to search for more information about them, and can read Japanese, the magic word is 宅配ボックス)
Another option quite popular here for young salarymen is convenience store delivery, where you tell Amazon "Ship it to the convenience store closest to my house." They're open 24 hours, take delivery of the parcel whenever it arrives, and hold it for you until it is convenient for you to stop by. This is free to the customer. (It costs the convenience store nothing to offer at the margin, and they really, really want to get you in the habit of going to "your" store as opposed to going to one of their numerous competitors located as far as several hundred feet away.)