Pretty much just like everywhere, with two exceptions.
In some cases, they may be encouraged, even financed, by local government. With the country going down in a basket, there are many buildings, even (or specially) downtown, which are in shambles and look rather ugly. Many places have walls facing the newly cut streets, and nobody maintains these walls - they are just plain fugly. So (the city considers that) they are better off when covered in some nice, and hopefully artful graffitti.
The other exception is the extremes into which the content of the graffitti goes. On one side, there are those written by political activists of certain right-wing movements (later known as parties), who think this is the cheapest way to advertise, or by football fan gangs, who want to pressure the courts to release their pals (which is doable but they're doing it the wrong way) or just want to create an illusion that they are oh so numerous (but then all the graffiti of the kind are obviously done by two or three guys). On the other side, there are ingenious and sometimes legendary graffiti with such pearls of wit as "džaba ste krečili" (you whitewashed [this wall] for nothing), "Da je Pera na vreme otišao u policiju, svega ovog ne bi bilo" (had Woody [woodpecker] gone to the police on time, none of this would have happened" (from an old cartoon, but refers to Petar Lazić from Index, once a cult radio show, who did have trouble with Sloba's police).
"Like summer rain, strong but innocent
Like winter sun, gleamning but powerless"
"Ne budi tužna, žabo ružna" (don't be sad, ugly frog)