Elevated garbage bin
They are garbage bins, elevated to keep out pests, and locked so that people won't pick through the garbage and spread the trash around.
A couple related observations:
Garbage pick up is usually 3 times a week in Brazil, and even operates on New Year's eve. I indeed saw garbage being picked up at 11 pm on New Year's eve. Back in the US and Canada, you're lucky if you're garbage is picked up even once a week.
Brazilian households produce much less garbage than North Americans. I'd estimate half as much as a similar size household in Canada or the USA.