A crab bucket is what it is: crabs in a bucket. However, what happens in the bucket full of crabs is what makes it a famous saying.
When a single crab is put into a lidless bucket, they surely can and will escape. However, when more than one share a bucket, none can get out. If one crab elevates itself above all, the others will grab this crab and drag them back down to share the mutual fate of the rest of the group.
Crab bucket syndrome is often used to describe social situations where one person is trying to better itself and others in the community attempt to pull them back down. Also often used in describing the ghettos of America (or anywhere, for that matter).