These are a bitch to unload. Rough seas!
Here's a video the SC State Ports Authority made for advertising.
Another video showing a different view.
Containers are loaded by: order of port of discharge, height, length, weight, if a reefer(loaded below deck, to keep out of salt spray, as they have to be plugged in), if a haz mat load(has to be kept above deck, unless a reefer, and in a area that would have easier access in case of a leak or fire).
If it is a break bulk item, such as a 50' yacht(usually placed into the water along side the ship but some times onto a lowboy flatbed) or the propeller blade for a giant wind turbine, it is removed or placed on board with slings then lashed down.
All over height open top containers are placed on top of stacks either topside or below decks if they can't be covered properly and need to avoid salt.
If a container is placed in the wrong spot it costs time and time IS money. We've had containers that were buried in the wrong spot. We had to do restows. That is when you take off anywhere from 2 or 3 to as many as 90+ containers to get to the one you need then you have to reload them in the correct order which may not be the same as they were taken off.