Yesterday my friend told me that my hotmail sent some obvious virus email. It seems that my email was kinda infected with virus. I didn't do anything special these day so I don't know how come my hotmail can be infected. The hotmail are in the internet right? Isn't it not about my computer?
Just because an email has a "From:" address of hotmail, does not mean it originated from hotmail. Spoofing a source address is trivial, and is done routinely by spammers and viruses.
It is unlikely that an email containing a known virus would be able to traverse hotmail servers.
The fact that the email had your From address means that it is quite likely that either you or your friend has a virus, or some other contact mutual to both of you has a virus. Viruses will often scour address books to find email addresses that it can use to send From and To, because infected emails are more likely to be opened if they appear to be from someone familiar.
Examining the headers of the infect email should reveal the IP addresses that the email traversed on the way to your friend. This may provide clues as to who has the virus.
Hotmail is indeed hosted on the Internet. Anyone with your username and password can log in and send e-mail. For a while, I saw many friends of mine have their MSN accounts hacked. Note that MSN accounts use the same login details as Hotmail. Their accounts were sending spam to all of their contacts. Changing their password solved this issue.
This is a good life lesson in keeping your anti-virus software up to date.