Computer viruses are spread through files, typically if you open them, so if it's on a Mac, the virus will not do anything to it since it's not programmed for the Mac OS, if the files is transfer to your Windows machine and you "accidentally" click it then yes it can infect your computer since it's design to run on Windows.
Worms on the other hand are quite nasty when you're on a hub, since most worms are spread through network vulnerability, both Mac OS and Windows depending on what network services they run can be infected. It's all dependent of the OS and what the malicious application was design to work on.
If the Mac OS holds the worm or virus, and if the worm or virus was programmed to spread only on a Windows machine, then the worm or virus would probably not be able to spread from the Mac OS to the Windows machine unless you transfer the files to your Windows machine.
It doesn't matter if the Mac is on the hub or not, the Windows will always be vulnerable despite the Mac being there or not. Hub/switches, it doesn't matter much, if you connect to the Internet, you're vulnerable.