If you play Overwatch on PC, or any other online multiplayer PC game, you've run into trolls. Trolls come in every flavor, and while most are effectively harmless, others can spew some of the most reprehensible language there is. When you encounter these types of attacks, as a bystander or the focus point, you have a few options left to you.
Do not feed the trolls
It only encourages them to stick around. Much like stray cats, if you give them an ounce of your attention, they've succeeded in their mission, and will continue on with their favorite passtime.
Don't be afraid to tattle.
The only way we as a people can curb people's assumptions that hateful things are okay to say, is to make sure they are penalized for their choices. In Overwatch, if you leave a match early, you are fined a certain number of endorsement points because it's an overall crummy thing to do. This is an automatic system put in place by Blizzard to try and ensure the best possible play experience for their 40,000,000 players. They don't have such a system for racist, sexist, or otherwise damaging speech. An engine that could monitor all chat, on every server, in every country where the game can be played would cost a fortune, and potentially slow down vital game processes. It is on you, the player, to report those who are acting in a way that could be psychologically damaging to someone. Blizzard is quick to take action against those who use such speech when their attention is brought to the issue, which is one of the reasons I love their game library.
Talk to the hand.
If playing the rat isn't your style, or you just don't want to have to deal with submitting form after form regarding other players' disgusting speech, there is hope for you. You can mute specific players in the match/team/general chat with a few clicks of the mouse. You can also decide that you wouldn't enjoy playing in a game with another individual, and ask that the system not pair you with them or pit you against them for a specified time period.
There be worse things 'round these parts. Beyond the trolls, there are other nefarious people out there with the desire to do you tangible harm. When playing an online multiplayer game, the basic gist is that you'll be playing with people you've never met, whom you'll probably never meet. The age old addage of "Don't talk to strangers" is a bit more difficult in this scenario, but there are things you can do to protect yourself from having your information stolen.
Access Denied.
Absolutely, under no circumstances, should you ever type your Username/User email/Password in any text field that isn't directly related to logging in. If your password contains anything that is specific to you (a birthdate, last name, etc.) consider changing it. If you have trouble remembering something that isn't easily retrieved from memory, and you don't want to change, that's okay, just be sure to avoid sharing ANYTHING personal. The results of giving away some things about yourself could be catastrophic.
Back away from the microphone.
If you are a minor or an otherwise vulnerable person, I would strongly recommend that you not participate in voice chat with anyone you don't know personally. When you're in the heat of the game, playing your best, you aren't actively aware of the things you might say, and that can be dangerous.
The internet isn't a no phishing zone, unfortunately.
Like your grandparents' email accounts, many online games are rife with attempts at gaining access to your login information. You might recieve a direct message/whisper from someone claiming to be with the game company and asking for you to validate your information so your playtime isn't terminated. Be sure to read and understand the login policy with the game company. They wouldn't ask you to disclose your login information via sketchy chat. One way to identify phishing attempts is the use of grammar. This is one of the best times to be a grammar nazi. If you're ever unsure of a source's credentials, don't give away anything you can't take back.
You shouldn't only exercise caution in your online gaming pursuits, you also need to be on your guard online. Part of being well armed is understanding what precisely your computer is telling the world when you reach out into the interwebs.

So let's conduct an experiment. I want you to click the button below, to learn exactly what this website, and all other websites, can figure out.
Safe Stars talks about how different security risks exist on the internet, focusing on scams and identity theft.
Safetynet Kids focuses on safety practices for younger internet users, honing in on the avoiding strangers.
Kaspersky provides a list of the top 10 safety rules surrounding the internet.