What is the meaning of [something is rotten in the state of Denmark]

There is something wrong, or something suspicious going on, in a place,organization, or system; often used to imply corruption