Yes, hackers can install apps on your phone, usually by exploiting a vulnerability in the operating system or by exploiting a vulnerability in an existing app. To protect your phone from hackers, I recommend following these steps:
1. Make sure your phone is running the latest version of its operating system.
2. Use a strong password or pattern to lock your phone.
3. Install an antivirus and anti-malware app on your phone to scan for malicious apps.
4. Make sure that you only download apps from reputable sources, such as the official app store for your device.
5. Regularly check your phone for any suspicious or unknown apps.
6. Be aware of phishing scams, which can be used to install malicious apps on your device.