FYI - The iFixit store links for the Torx screwdriver incorrectly displays the security Torx drivers. I had my own set of regular Torx drivers and competed this successfully. I did not find the security (center post) variant of the Torx screwhead anywhere in my iMac.
Thank you Brittany for putting together an awesome guide! I was able to swap in a leftover MBA SSD into my 2007 iMac before gifting it to my father-in-law. This iMac was showing its age with Lion installed, mostly due to 2 GB of RAM and a so-so magnetic drive. I was hesitant to gift a hand-me-down with little usable life. Not anymore! I have no doubt that the 5GB of RAM and a super fast SSD breathed another 5+ years of enjoyment into this iMac. Reuse beats recycling! Thank you!
I only had two 25 mm T8 Torx on my model. (The two inner orange circles as shown in the diagram.)
I was unable to disconnect the LCD cable, possibly due to fear of breaking the connector. I was able to swap drives with it connected. The iMac was placed on its rear cover on a large table, leaving plenty of workspace to rotate the LCD panel to the left side while still connected. The screen will lay at an angle on the case edge. I verified the LCD cable was clear of the case endue and not pinched.
This also avoids going near high power capacitors with your fingers.