So you think you know this one, right? "Prego" means "you're welcome," and is the proper response after "grazie," or "thank you."
So what if you're in Italy and the barista or the waiter comes up to you and says "prego, signore/i/a/e." Are you going to wonder what he's thanking you for? He is not thanking you- this is a prompt for you to tell him your order- the equivalent of our "are you ready to order?" The word can also be a cue to go ahead- to precede someone at an entrance, to help themselves to goodies, to dig in. In more formal Italian (especially written) it can be a polite way of making a request or even a demand e.g. prego non fumare (do not smoke).