A modifier is a word or phrase that gives more detail about a subject. A dangling modifier modifies a word that is not clearly stated in a sentence.
Example: Having struggled through the long commute, Dan parked his car in his usual spot.
The doer must be the subject of the main clause that follows. In the example, Dan is the logical doer; therefore this sentence does not have a dangling modifier.
Example: Having struggled through the long commute, the car was parked in the usual spot.
“Having struggled” is a participle that expresses action, but the doer is not the parking spot. Because the doer of the action is not clearly stated, this participial phrase is a dangling modifier.