using windows on a mac for a few applications i need to use visual studio and a few other windows programs but i am now looking at getting an iMac.  Can someone recommend the best solutions for being able to use these windows programs from a mac.

I see that there is bootcamp built into the mac operating system but i am unclear if that is the best solution from a workflow point of view (switching back and forth)
Virtualisation software such as VMware Fusion, Parallels or Virtual Box will allow you to run windows "in a Window". They work very well.

I recommend VMWare, as best performance-wise, and has some advanced features which make the file exchange between OS's almost seam-less. VirtualBox is less user friendly, but still works well and is free.

Note that for this to work well you need plenty of RAM. I'd recommend 4GB as a minimum.