First, unless you had a custom configuration done, your iMac comes with a slow, 5400 rpm internal hard drive. My late 2012 Mac Mini came with one, but after 4 months, I replaced it with a fast, Samsung 840 Pro 256 gig SSD, and the speed difference was phenomenal! Think "I have the need, the need for speed", and you'll have an idea. I eventually placed the (slow) 1 TB drive inside a nice, slim external Orico enclosure.
You cannot just use a "bare" drive by itself, without putting it inside an external enclosure. As I mentioned, I purchased a Samsung 850 Pro 512 gig SSD:
https://www.amazon.com/Samsung-850-...3563223&sr=8-1&keywords=samsung+ssd+pro+512gb
and installed it (was a snap!) inside this slim Orico external enclosure:
https://www.amazon.com/ORICO-Enclosure-Super-Speeed-External-SATA3-0/dp/B01LXY78V6
In fact, it is right in front of me now! I have the SSD partitioned into 3 "pieces"/partitions, and I am using 2 of them for a SuperDuper! backup for each of my Macs.
Now, note that this is via USB 3.0 connectivity. Booting your iMac to that external SSD will be a "little" slow, as you are booting the machine externally. But, once you are "there", you'll get SSD speeds in doing tasks on that SSD. As for "exchanging" information between your internal drive and the SSD, that "could" be a little slow, again because you are going through the USB 3.0 port.
It would actually be better if you replaced the slow, internal drive with an SSD. But, the procedure is not easy (my Mac Mini was a much, much easier to do it). This link shows how to do it:
https://www.ifixit.com/Guide/iMac+Intel+21.5-Inch+EMC+2638+Hard+Drive+Replacement/28781
But, as you can see, that is not easy.
The other issue you'll need to address doing this (ie, having an external SSD be basically the "heart" of your iMac) is backups. I guess you could possibly use your slow internal drive as a backup to the external SSD, but I have never tried such a setup.