A dangling modifier is a word or phrase that modifies a word that is not in the sentence, or modifies a word other than the one it intends. Examples in red.
Sipping wine on the terrace, the moon looked almost full.
The moon was sipping wine on the terrace?
Walking up the drive, the castle came into view.
The castle was walking up the drive?
Pondering what she had said, his fingers twanged her bra strap.
To resolve dangling modifiers, make sure the word you intend to be modified is in the sentence:
As they sipped wine on the terrace, the moon looked almost full.
She walked up the drive. The castle came into view.