Loitering means standing around or hanging out in a public place without a specific purpose, plan or any particular business. It's like when you go to the park without any toys, snacks or games to play, and you just stay there, walking around or sitting on the bench without doing anything in particular.
Loitering can sometimes be a problem if people stay in one place for a long time and block the way for others to pass through or if they do something that makes others feel uncomfortable or threatened.
Sometimes police officers ask people who are loitering in a certain place to move along, so they can keep everything peaceful and safe. It's not against the law to loiter, but it's helpful to be respectful of others around you and to follow any rules or guidelines set up by the people who are in charge of the place you're in.