How to check an iPhone for viruses
[Re-Titled by Host]
iPhones don't get viruses. Is the iPhone 4 you are talking about jailbroken? Have you tried resetting the device:
Hold down the Home and Power buttons at the same time and continue to hold them both down until the Apple appears. Once the Lock screen displays, see if the issue is resolved.
If it is not, then you need to back up the device to either iCloud or iTunes:
Back up your iPhone, iPad, or iPod touch using iCloud or iTunes - Apple Support
Then first time around, set the device up as a new device (do not restore it from the backup), just sign in and follow the set up prompts for setting up a brand new phone for the first time. See if the issue is resolved. If it isn't, then it sounds like the phone may be damaged.
If it is resolved, erase it again, and then restore it from the backup you made and see if the problem returns. If it doesn't, then you are all set. If it does, then you have a corrupted backup, and you will need to erase it again, and set it up as a new device (not from the backup).
Cheers,
GB
I've been asked to make sure that my phone is secure on some websites
Asked by whom?
How to check an iPhone for viruses