Lots of apps and games have privacy settings that let you decide who can chat to you or see your details. You can make your account private so that you can control who can talk to you.

If you don’t want someone to contact you anymore, look for buttons such as ‘block’ or ‘mute’ which you can press to stop that person from messaging you again.