You can block hackers from your phone by using a VPN. When you connect to a VPN, all of your online traffic is anonymized and encrypted, so it's impossible for hackers or anyone else trying to spy on you to see what you're doing.