There's a bunch of videos or written step-by-step instructions on the Web for taking apart your iMac.
Just search "iMac disassembly" or "iMac teardown" and you'll find all the relatiuve material.
You might be needing specialized screwdrivers (the pentalobe type comes to mind), suction cups, plastic spudgers, ...
Follow what's in the videos, and if you feel at a certain point that it gets too complicated you can retrace your steps to restore your computer to its initial state.
Take your time, shoot relevant photos of the process, store the screws with a numbering method. It's not much more difficult than tearing down a camera...
Ciao from Massimo