So it was a spyware or keylogger, or some script that executed right after you entered your passwored.
They were monitoring you, and waiting for you to allow them access, and they took advantage of it.
I'd ran a deep scan of your pc before anything else. Best bet, format your drive