Hi There
To check the version of Mac OS X you're running click on the Apple menu in the top left corner of the screen and select About This Mac. The iPhone 4 requires a computer running Mac OS X 10.5.8 or later with iTunes Version 10.1 or later (http://www.apple.com/iphone/specs.html).
You do not need to purchase a new computer just a new OS if you're running 10.4.x (x is any number). If you're running 10.5.x you just need to run software update to get the latest version of 10.5 and iTunes which the iPhone can be used with.
J.C