First let me explain that no matter which O/S you run, you are open to attacks. All of these problems are very much like medical diseases... they know no boundaries and care not about your sex, ethnicity, etc. they attack, period. To suggest that you buy a particular computer based on its O/S's ability to thwart these types of attacks is misleading. Regardless of which O/S or computer you choose,
99% of security is the users responsibility!
Regardless of which O/S, X Panther, Linux, Windows... a computer in the hands of a person who is diligent in providing a safe environment for their work, will be spyware and virus free.
First, start with your new connection. Ask your provider what they have for free online tools and or software to download. Most ISP's (internet service providers) supply these types of tools for free or at the very least free for one year.
If you are into Windows then these might be good starts for you.
Anti-Virus: One of the best out there for free is Grisoft's AVG. It also handles email anti-virus.
http://free.grisoft.com/doc/1
Anti-Spyware: The most popular free application out there is Spybot.
http://www.safer-networking.org/en/download
Microsoft has a Spyware beta out that works well (use on my laptop):
http://www.microsoft.com/athome/security/spyware/software/default.mspx
I use Ad-Aware SE Plus (on my desktop) from Lavasoft:
http://www.lavasoftusa.com
Firewall: I use Comcast, got McAfee firewall free for my first year, signed up to continue. Microsoft Windows XP with service pack 2 installed will give you a free firewall application built in that can be accessed via your Control Panel.
Do some research via Google and make your decisions based on user reviews and by trying the software yourself for its free trial period.