Bok at both ends of a conversation
A visitor may hear Bok when people meet and again when they separate. It is a familiar greeting, not an instruction to leave. Context does the work, just as it does with Italian ciao. If you have only just met someone in a business setting, a polite daytime greeting is a better starting point.
Why you may also hear Bog
Bog and Bok are related familiar greetings, but their frequency and associations vary across regions and speakers. You need not master every regional variant to travel comfortably. Recognise both if you hear them, and reply in a way that fits the relationship. A neutral polite hello remains useful when the surrounding conversation is unfamiliar.
From the café counter to the telephone
A greeting before ordering gives a conversation a clear opening. Over the phone you may hear Molim? or Halo? instead. Molim has several functions in Croatian, so context matters: at a counter it can invite your request, while at the start of a call it can mean that the listener is ready for you to speak.