Hello, smart people of the internet

I have this problem I hope you can help me with. I keep getting redirected to Yahoo site and I can’t seem to stop it! It also seems that when the site is loading I’m being redirected through other sites (or even several of them). I don’t know how to explain it, but my browser just keeps flashing and new windows keep opening till I’m finally redirected to Yahoo. But that’s not even the worst part. I started seeing Search Window Results ads, EVERYWHERE. This is insane on what sites I can find a suggestion to buy some random merchandise like,batteries!! I cannot take it anymore and need solution to this problem!! Can you help me?