What’s the difference between dangling and misplaced modifiers?

A dangling modifier is a modifier that does not have a subject within the sentence. In contrast, a misplaced modifier does have a subject, but the modifier and the subject being modified are separated.

The following sentence has a dangling modifier:
“Eager to leave the room, the presentation ended early.”
In this sentence, there is no subject indicating who was eager to leave the room.

In contrast, this sentence has a misplaced modifier:
“My mom gave the food to the dog that we wouldn’t eat.”
The placement of the modifier “that we wouldn’t eat” makes it seem as if it is modifying “the dog” instead of “the food.”

A clearer structure would be the following:
“My mom gave the food that we wouldn’t eat to the dog.”