What does loiter mean?

You are correct!

From our dictionary:

loi•ter

Pronunciation: (loi'tur), [key]
v.i.
1. to linger aimlessly or as if aimless in or about a place: to loiter around the bus terminal.
2. to move in a slow, idle manner, making purposeless stops in the course of a trip, journey, errand, etc.: to loiter on the way to work.
3. to waste time or dawdle over work: He loiters over his homework until one in the morning.

v.t.
to pass (time) in an idle or aimless manner (usually fol. by away): to loiter away the afternoon in daydreaming.