Maybe you got it in time.
It is normally known as a drive by trojan download.
If you have C Cleaner run that or if you use I/E try tools And delete browsing history.
What you need is an anti-malware program that gives you full time protection.
I understand Malwarebytes Pro is a one off payment and that would stop programs like that downloading on to your computer.
Security suites or anti-virus programs will not stop the likes of that happening again.