A dangling modifier is a phrase or clause that does not hook up to any other word or phrase in the sentence. The dangling modifier is a gross grammatical error, one you want to avoid.
The error typically arises with adjectival phrases, especially those that begin sentences. Here's the rule: When you begin a sentence with an adjective, that adjective must modify the grammatical subject of the sentence. If it doesn't, it dangles.
When you start a sentence with a present-participial phrase, that is, an ‑ing verb, the grammatical subject must be the agent of that verbal activity. Thus:
Hoping to gain favorable relations with the media, the candidate called a press conference. When you start a sentence with a past-participial phrase, that is, an ‑ed verb, the grammatical subject must be the recipient of that verbal activity. Thus:
Decided in 1954, the Supreme Court case desegregated public schools.