Resetting your iPhone or iPad is simple — head back on your iOS configurations > standard menu, and scroll all the way down to Transfer or Reset iPhone/iPad.
That said, iOS devices are not proof against malware: https://miriamlxqh491146.blogolenta.com/26864837/getting-my-what-is-web-security-to-work