Prepositions in Croatian always govern a specific grammatical case, and the choice of case often shifts the meaning. The preposition u (in/into) is the clearest example: when u expresses motion toward the inside of a place, it takes the accusative, as in idem u grad (I am going into town); when u expresses location, it takes the locative, as in ja sam u gradu (I am in town). The preposition s or sa (with) takes the instrumental case, used in idem s prijateljem (I am going with a friend). Bez means "without" and is followed by the genitive, producing phrases like kava bez šećera (Coffee without sugar). The directional preposition prema (towards) governs the dative, so idemo prema centru means "We are going towards the centre." The preposition kod (at someone's place) also takes the genitive, used in bio sam kod liječnika (I was at the doctor's).
A handful of common locutions are worth memorising in their idiomatic forms. Kod kuće means "at home," as in ostajem kod kuće (I am staying at home). To refer to going to a person rather than merely being at their place, you can say k liječniku with the dative or stay with kod liječnika; either appears in moram ići k liječniku (I have to go to the doctor). Note that this k-versus-kod alternation parallels the u accusative versus u locative alternation: one form encodes motion toward, while the other encodes presence at.