Serbo-Croat? Serbian? Croatian? Bosnian? Montenegrin? How many languages is that? Saying that there are four languages, or that there is one, are both oversimplifications. Here's an approximation of the whole truth:
In the linguist's sense, there is just a single language, a South Slavic dialect continuum with a dozen or more dialects and four standardized forms. However, Standard Serbo-Croat, which prevailed until 1989, was never a single standard. Rather, it was a fusion of two existing standards, an agreement that Standard Croatian and Standard Serbian (both of which already existed) would be treated as equally acceptable for all purposes. In this way it is like the position of Standard Bokmål and Standard Nynorsk in Norway, and like what would be the case if British society decided to accept Standard American English as a written standard with a status equal to Standard British English, or vice versa. It is that agreement which came apart when Yugoslavia did, and it has been followed by the creation of a third standard for Bosnian and a fourth one for Montenegrin.
All four standard languages are founded on the historic dialect of Eastern Hercegovina, an instance of the neo-Štokavian macro-dialect which is now the most widely spoken variety of naš jezik 'our language', as it is politely called, in the whole of the former Yugoslavia. (Macro-dialects are conventionally labeled by the word they use for 'what?' — in this case, što.) They differ roughly as follows:
- Standard Croatian employs exclusively Ijekavian forms (that is, the descendant of historic jat vowels is ije), admits influences from the Chakavian and Kajkavian macro-dialects, is relatively hostile to Western loanwords and does not normally respell the ones it accepts, and is written exclusively in the Latin script.
- Standard Serbian allows either Ijekavian or Ekavian forms, has no such influences from the other macro-dialects, is relatively friendly to Western loanwords and respells the ones it accepts to match Serbian pronunciation conventions, and is written with equal acceptability in the Latin and Cyrillic scripts.
- Standard Bosnian is close to Standard Serbian, has some influences from the palaeo-Shtokavian macro-dialect, is exclusively Ijekavian, and uses the Latin script only.
- Standard Montenegrin is even closer to Standard Serbian, but it uses the Latin script only and is exclusively Ijekavian.
There are also many differences in vocabulary, on about the same scale as the differences between British and American English.
My understanding is essentially dependent on the work of Miro Kačić, the Croatian linguist (in both senses of that term). While highly respected, Kačić's work is of course controversial, like everything else about the language he worked on.