According to a Japanese study published in April 2019 in the journal Scientific Reports, cats know their names and can distinguish between random words.
The study looked at pet cats and their owners, as well as cats living in cat cafés. Interestingly, cats in cat cafés had strong responses to their names being uttered by strangers as much as the pet cats had strong responses to their names being spoken by their owners. Cats living in cat cafés also responded strongly to the names of other cats living with them. This suggests that cats understand subtle differences in words.