It's legal. Doesn't exist as an offense. You'd be actually hard pressed to get a local here to understand the definition, as there's actually no word for it in the language.
You may be chided by the shop owner if you stand too long at his window and obstruct the view; courtesy should be the rule and people usually move aside. Usually after a couple of minutes two (or more) acquaintances (or random people who just engage in conversation for no reason) will notice that they're in everybody's way and move closer to a curb or wall.
Loitering is the traditional way of socializing among the young - mostly replaced now by going to a playhouse (sports or electronic games) or a cafe. There's usually a traditional place where they gather before going somewhere, or not going anywhere at all, they just stand around and talk, see who's passing by, who's returning from the evening later than they etc. Sometimes there's something to drink, but I'm not finding empty bottles in those places, not even soda.