You will need to purchase a retail copy of Mac OS X 10.6 Snow Leopard, still available from the online Apple Store, and upgrade your iMac to at least the version. You will then be able to run iTunes 11, necessary to sync to a phone that's running iOS 7. Whether you can and wish to further upgrade to OS X 10.7 Lion or 10.8 Mountain Lion will depend on your specific model of iMac and your needs and preferences. System requirements for Snow Leopard and Lion can be found here:
http://support.apple.com/kb/HT4949
and for Mountain Lion here:
http://www.apple.com/osx/how-to-upgrade/
If you do consider upgrading beyond Snow Leopard, be aware that Lion and later OS X versions will no longer run PowerPC-only applications, so some of your current applications may need to be upgraded or replaced.
Regards.