Ubuntu will run better if you dual boot, but it's a more serious commitment; you'll have to repartition your harddrive, which is a risky business, though it usually works without problems so long as you have the space to devote to it.
When you run it as a virtual machine, machine resources (and most importantly, the RAM) are shared between the host machine and virtual machine. You can devote most of your RAM to the virtual machine, but if you devote too much, the host may become unstable and unresponsive; and in any case, Ubuntu won't have as many resources as it would have if booted directly.
If you do choose a virtual machine, I would choose VirtualBox. Its free, open source, and very feature-rich.
There are a lot of variables that would affect how I would answer that question, such as:
- How old is your computer? How much RAM does it have? Does it have enough to share between the two machines without there being a problem?
- Are you interested in giving Ubuntu a serious try as an operating system, or are you only interested in it for the sake of your class?
I'm a big linux fan myself; I much prefer it to Windows, so in general I'd encourage you to give dual booting a try, to really get the most of it. But everyone is different.
But I should mention that there's a third option to consider, which is to use Ubuntu's wubi installer which installs Ubuntu in its own folder inside your Windows partition. It's sort of halfway between the two options, since it does allow you to boot directly in Ubuntu. However, you're stuck with using the less-than-ideal filesystems that Windows uses, rather than the kinds that linux runs best on