If you're afraid of viruses on your iPhone, malware can't do much even if it finds its way into your phone, thanks to the way Apple designed IOS, but usually nonetheless, look for behavior like Safari redirecting itself to Web pages you didn't request, emails and texts sent automatically without your permission, or the App Store opened by itself.
No matter what symptoms you are experiencing, the first thing you should try to determine is whether the problem you are experiencing occurs all the time, or only when you run a specific application, without the problem and watch the application you are using when it occurs.
If you can narrow down the issue to a single app, see if there is an update available for it in the App Store, that might fix the problem, but if not, uninstall that app. If the problem disappears after uninstalling the app, now you know the root cause, you can try to reinstall the app again to see if the issue is resolved, or contact the technical support of the app maker.
And if you can’t limit the problem to one app, your next step should be to restart your iPhone, just like restarting your computer, turning your phone off and back on again can solve a lot of unexpected issues.
Clear Cache in Safari
Some issues, especially those related to web browsing, can be resolved by clearing your browser cache, and this is especially true if you find that Safari redirects to websites you didn't request or links stop working the way they should.
Restore your phone to a previous backup?
If none of these things solve your problem, it may require more severe actions to try to get your phone back to its best shape. If you have a good idea of when your phone started experiencing problems, you may be able to restore your phone to a backup from before the infection.
But this will erase everything added to your phone since that backup, including apps, photos, and music, so only do this if you're sure you have a serious problem and nothing else has worked.
Start over with factory settings?
If resetting your phone to an old backup didn't fix the problem, and you're still affected by malware or another glitch, you have one last method to try.
Reset your iPhone to factory settings, and instead of restoring a backup, set up the phone as a new device, and don't restore any apps or data.
Work with the phone in its new factory condition, if the problem goes away, start downloading the apps you lost manually.
If the problem persists even after resetting the phone, then what you have is a hardware issue, and no virus can live on the iPhone through a factory reset, so you should take the phone to the Apple Store for service.