Messages that contain one of your keywords count as mentions of you: Discord highlights them, adds them to your mention badge and notifies you like a ping.
:scroll: Older messages you scroll back to are highlighted the same way.
Settings
Keywords: the words or phrases to watch for.
Regular expressions, Match case, Whole words only: how keywords match.
Ignore bots: leaves bot messages alone.
Ignored users, channels and servers: picked from your friends and servers; keywords there never count.