Serbian, Croatian, Bosnian, and Montenegrin are standardized varieties of the Serbo-Croatian language continuum. They share a common grammatical core and a high degree of mutual intelligibility, meaning a Serbian speaker can generally understand Croatian (and vice versa) with little difficulty. The differences lie mainly in vocabulary nuances, some pronunciation variations, and script (Cyrillic vs. Latin), but these do not constitute a language barrier.
Slovenian, while also a South Slavic language, is a distinct language with significant differences in grammar, vocabulary, and phonology. Mutual intelligibility between Serbian and Slovenian is limited; speakers may recognize cognates and grasp the gist of simple sentences, but full comprehension requires learning the language.
In summary, a Serbian speaker can readily understand Croatian, but would need to study Slovenian to communicate effectively.