I have difficulty determining whether a modifier is dangling or misplaced; my book does not clearly define the difference. I think the difference is that in a misplaced modifier the modifier is separated from the word it modifies, and in a dangling modifier the modified word does not appear in the sentence. Is this correct?

Yes.

Misplaced modifiers are closest to nouns they can't possibly describe.

http://www.chompchomp.com/terms/misplacedmodifier.htm

Yes, you are on the right track! Understanding the difference between a dangling modifier and a misplaced modifier can be challenging, but your understanding is mostly correct.

A misplaced modifier occurs when a modifier is separated from the word or phrase it is intended to modify, often resulting in confusion or ambiguity. In other words, the modifier is placed in the wrong location within the sentence, making it unclear which element of the sentence it is modifying. This can lead to unintentional changes in meaning or humorous interpretations.

For example, let's look at this sentence:
"Running through the park, the tree suddenly appeared."

In this case, the phrase "running through the park" seems to modify "the tree" instead of a person or an object that could be feasibly running. To correct this misplaced modifier, the sentence could be rewritten as:
"While running through the park, I suddenly saw the tree."

On the other hand, a dangling modifier occurs when the intended word or phrase that the modifier should modify is missing from the sentence entirely. The modifier is left "dangling" without a clear target, leading to confusion or illogical statements.

For example, consider this dangling modifier:
"After studying all night, the test was aced."

Here, the modifier "After studying all night" does not have a clear target in the sentence, as the subject of "acing the test" is missing. To rectify this, the sentence could be revised as:
"After studying all night, I aced the test."

To determine whether a modifier is dangling or misplaced, it's essential to consider both the placement of the modifier and the intended word or phrase it should modify. Ensure that the modifier is situated close to the correct element it modifies, avoiding unintended changes in meaning or unclear connections.