I want to get someone's attention by using the @username feature. But I noticed that several people use the same username. So how does that work?
If they have all recently been in the chatroom you are in, or participating in the same comment thread, then there is no way to differentiate them. If you ping one, you will ping them all.
user147263 points out that Rule 4 says that in comments, the user chosen is the user
who matches the name supplied
who has participated in the comments on or edited the particular question or answer
who has acted most recently (editing, commneting, etc)
However, I have been the "victim" of misdirected pings to
@rob in chatrooms, so, unless the code has changed recently, I am pretty sure that chat pings any match. Further evidence that the chat code is different: multiple people can be notified in a single chat message.