It's not very helpful to say there's no virus on an iphone. This person obviously has a problem, call it a virus or just call it a problem. Whatever it is, it needs fixing.
In case it's useful here's an experience I had. When accessing professional film critics from the app IMDB, I kept getting very annoying pop-ups that essentally blocked my iphone (telling me I had won an iPhone 7!!!!) I did a reinstall of IMDB but the problem persisted. I then did a complete reboot of the iphone and the problem disappeared. Whether it was a virus or not is not an issue. It was the work of a crook who didn't mind screwing up other people's hardware. I get the impression that Safari is a shaky piece of software as I have had other problems with it.
The mention of a phone doing "magic things" suggests a loose connection that is triggering random events!
I would suggest (1) deleting the offending app and then reinstalling it. If that doesn't work then try (2) doing a full reboot of your hardware. After that a full restore might be in order and if that fails then get Apple involved. Good luck. At least such experiences are rare in the worlds of Apple and Android.