The American flag is only supposed to be hung upside down in a time of great distress. In most cases, people hang the flag upside down as a way to protest issues with the government. It is considered an exercise of the First Amendment right.
According to the United States Flag Code, hanging the flag upside down is a signal that the owner of the flag is in extreme danger. The person's life or property has to be threatened. If the flag is hung upside down, military personnel recognize this as a call for help. Though hanging the flag upside down is not desecration, the act is still frowned upon.