Someone ended up here yesterday after googling this question. The answer wasn’t here then (sorry), so I hope you try again today!
Japanese language books usually concentrate mainly on the use of katakana for words borrowed from foreign languages like パリ (Paris), and then might go onto mention more specialist uses like animal names in science. In Japan and even more in manga and anime, however, the most notable use is often katakana just for emphasis or to make a word stand out. As it says in the book Japanese English: Language and Culture Contact (recommended, even for non-linguists), katakana is probably best thought of as the Japanese italics. When baka is written in katakana rather than the more “proper” hiragana (ばか) or kanji (馬鹿), it is an example of this “italics” function.