Actually, the iMac 7,1 is the 20/24-inch Mid 2007 models, which support the latest version of OS X, El Capitan. However, you would need to make sure you have at least 2 GB RAM, 4 GB+ is better, as they only came with 1 GB. Also, you would need to follow honestone's advice and purchase Snow Leopard first and install it, as you need access to the App Store to download and install El Capitan. It isn't available anywhere else.
C
Thanks, Cory, for the correction.
Eddy, you will need to go through the following steps to upgrade the OS:
1. As Cory stated, you need more RAM in your machine, and going to 4 Gig would be the way to go.
2. You also need to purchase an external hard drive. It needs to be at least 500 gig in size.
3. Here is a link for the various iMac 7,1 models. It would be helpful if you could let us know which exact model you have.
http://www.everymac.com/ultimate-mac-lookup/?search_keywords=iMac7,1
4. You should start to clean off unnecessary/no longer needed stuff from your internal drive.
5. Given the machine is 9 years old, and assuming it still has the original internal hard drive, that drive is also getting old. So, start making backups of the stuff on your internal drive to the external drive. This link explains how to use Time Machine for that:
http://www.wikihow.com/Use-Time-Machine-on-a-Mac-Leopard-10.5
6. Make sure all third party software you use is compatible with at least Snow Leopard (OS 10.6.8). If necessary, download and install any necessary upgrades for such software.
7. After you purchase the Snow Leopard DVD, boot your iMac from that DVD, and use Disk Utility there to perform disk cleanup/maintenance/repairs. Hopefully, that will tell you how good/bad the drive is.
8. Now, you are ready to install Snow Leopard. What you'll need to do is Erase, Format, and if necessary, Partition your internal drive. Then, install OS 10.6 onto the drive (or if you partitioned it, onto one of the partitions).
9. As part of that installation process, you'll be asked about "obtaining" anything you need from a Time Machine backup. You would select that, and from the Time Machine backup you made in step 5 above, your stuff will be "copied"/recovered from that backup to your internal drive.
10. Restart your Mac, and assuming allis well, go to the site I mentioned above to obtain the OS 10.6.8 Combo Updater. Download and install it.
Yes, that seems like a lot of work/effort, but it is necessary to insure a smooth transition. Once you have OS 10.6.8 on your iMac, you should get into the habit of performing periodic disk cleanup/maintenance/repairs, and backups.
When you are satisfied with OS 10.6.8, and you want to upgrade to a "newer" OS, it would be best to upgrade to an "intermediate" one first, instead of making a huge jump to OS 10.11.4, the latest version of El Capitan. I of course do not know which one you want to upgrade first, but you'll be able to upgrade for free to OS 10.7.x, OS 10.8.x, OS 10.9.x, OS 10.10.x, and/or OS 10.11.x. Of course, you'll need to, once again, obtain any needed upgrades for any third party software you use to insure compatibility with whatever OS you'll be upgrading to.