Just as in Macedonian, the "primary" or "textbook" meaning of karati in BCS is "to scold (someone)". That can be witnessed in folk songs such as "Karala majka Maricu" (Croatian) or "Mehmeda je stara majka karala" (Bosnian).
The meaning of "fuck" is recent, and comes from entirely different source -- slang. From (common Slavic) "kurac" (Penis), a feminine form "kára" was derived in slang, and from there there was just one step to the verb. It belongs to somewhat older slang inventory, but it was eternalized in the punch line:
"Sad ću da te karam!" (I'm going to fuck you)
uttered by Bata Živojinović in 1984 movie U raljama života.