Where does windows install? In the hardrive?

The code for a virus can reside on many things, usually the hard drive, in memory, on any kind of removable storage, or network storage. The list seems endless to those looking for opportunities to compromise your machine.