Hey there, welcome to BleepingComputer.
This is quite a broad question, and it would be very hard to pinpoint exactly where this came from.
You could have contracted it from the internet/P2P/email/messaging as examples.
Best things to do are to keep your antimalware programs up-to-date and to run them regulary.
You did appear to have a backdoor on your system. Here is a description:A back door is a means of access to a computer program that bypasses security mechanisms. A programmer may sometimes install a back door so that the program can be accessed for troubleshooting or other purposes. However, attackers often use back doors that they detect or install themselves, as part of an exploit. In some cases, a worm is designed to take advantage of a back door created by an earlier attack.
As a precautionary measure, I recommend that you do the following immediately. Disconnect the infected computer from the internet until the computer can be cleaned. From a clean computer, change your online passwords-- for email, for banks, eBay, forums etc.... Do not change passwords or do any transactions while using the infected computer because a possible attacker may get the new passwords and transaction information. I want to stress that you shouldn't get worried, these kind of attacks are very rare, but I guess it is better to be safe than sorry.
I hope this helps you somewhat in trying to find the source of this problem.
Have a read of this excellent post by Quietman7:http://www.bleepingcomputer.com/forums/t/69440/the-ten-most-dangerous-things-users-do-online/
Also I recommend that you take a read here:http://www.bleepingcomputer.com/forums/t/2520/how-did-i-get-infected/
It's excellent info that's not too time consuming to read. It'll boost the safety on your computer to make sure that nothing like this happens again.