I went on a movie streaming site and a bunch of "popups" came up, like suddenly I was in the appstore or some completely different tab. The real tab I wanted to go to is probably somewhere opened too, but what do I do now?
You were probably switched to the App Store app through a URI scheme. The web page will still be open in Safari. You can either switch back to Safari normally using the home screen or through multitasking.