Most of the places we camp (USFS campgrounds) have a strict "Pack It In, Pack It Out" policy. You MUST take your trash home with you. Then, just to make it more interesting, many of the trash containers in towns near the campgrounds have signs proclaiming that "Private Dumpster, Not For Public Use!" They do not want campers filling their dumpster!
Some USFS campgrounds (usually those close to towns) have bear-proof dumpsters.
Those that are several miles from a town often do not.
There is usually a bulletin board at the entrance, with the rules plainly posted. Read it.