Hi Jjcvan,
This is a pretty normal thing to encounter while browsing the internet. Don't be worried when this happens as it can not affect/damage your iPhone in any way. To block these from happening, go to Settings > Safari. From here turn turn "Block Pop-Up windows", "Do Not Track", and "Fraudulent Website Warning" on . This should fix your problem.