Sounds like a browser redirect virus, see this advice. (Others available.)
To do the clean-up:
- Download the latest versions of various security software. My preferred set is the free versions of: Malwarebytes, adwcleaner, ComboFix and HitmanPro. As some security nasties are clever enough to block fix attempts it may be necessary to use a different browser, or to copy the install packages off a memory stick created by different computer.
- Run these one after the other. With luck they will find and fix all the problems. (Compromised computers typically have several.)
- Probably won't be necessary because Windows Defender is much better than it used to be, but if the problem persists download another AVM and run a scan with that.
- It may be necessary to do the above with the computer booted in Safe Mode – Windows 10 howto here. (Safe mode starts the computer in basic mode, in particular it doesn't run most of the user loaded programs & start services liable to be causing grief. Although the computer isn't set-up to meet user needs in safe mode, it can run clean-up software without risk of interference. )
If this is too intimidating, most PC shops will do it for you, for example Curry's charge £45.
To stop it happening in future, try being more aggressive with Ad's by installing Privacy Badger, AdBlock+ and/or uBlock. These browser plug-ins block suspect websites and restrict what can be downloaded. Note they address a species of security & privacy threats that Windows Defender and other anti-virus packages may not.
Dave