To the best of my understanding, Hotmail is very similar to Gmail, Yahoo Mail, and many other web-based mail services. Your mail, contacts lists, and other pertinent email related information is held on those mail services' servers. Acquisition of the contacts list (all that's needed to send mail to everyone on yours) could have been made from the Hotmail system, or perhaps you had contracted a virus or trojan that acted upon your computer to gain that list access. It could have been the result of an email that you sent to a list of folks which contained a clear copy of everyone's email address within each and every message that got sent.
There's a number of possibilities for that kind of email mischief. It has probably happened to most of us at one time or another, whether we were aware of it or not. Not fun to have to ponder or deal with. About the best thing you can do is as you have already done... change passwords. You could also change email accounts, but that's a pain. For the future, always remember to setup mass mailings or forwardings of things you get sent, so that all the recipients are made as BCC (blind carbon copy) and each recipient will only be able to see his or her own email address in the mail header.
I'm not an expert on any of this, but have been around enough to have some small insight into some of it. Good luck from here.
By the way, in the vernacular of today's Internet and Web, the term "Viral" generally refers to the wildfire-like gossipy spreading across the web of things like rumors, naked pictures which got leaked, videos that folks think the subjects wouldn't like others to see.... stuff like that. (busybodies)