Bear boxes are used to protect bears and human food from each other at frequently-used campsites in American national parks (perhaps elsewhere as well, but I write only from my limited experience). They are big metal cabinets whose doors can be locked using a simple tool (usually nothing fancier than a hex wrench) chained to them. Tourists are encouraged to secure their food, trash, and other items that might smell attractive to bears in these boxes overnight, both to keep it from being stolen by wild animals but also in the hopes that the animals won't learn to scavenge for food around people. Bears that get into the habit of stealing people food have been known to inflict serious damage on cars and other human property while searching for food, and eventually have to be killed before they become more dangerous to people.
Bear boxes are generally available in established campsites close to major roads, towns, trailheads, and especially ranger stations. When camping deeper in the backcountry, it is necessary to use other measures, such as bear bagging or bear cans.