The test
After an introductory phrase, ask "who is doing this?" The answer must be the first noun after the comma.
Two fixes
Name the doer right after the comma (Walking to school, I got soaked), or put the doer inside the phrase (As I walked to school, the rain soaked me).
Misplaced modifiers
A related error puts a describing word next to the wrong thing: She almost drove her kids to school every day (did she nearly drive?) vs She drove her kids to school almost every day.
Frequently asked
Dangling vs misplaced modifier?
A dangling modifier has nothing correct to attach to in the sentence; a misplaced one has the right target but sits in the wrong spot.