How much RAM installed on your Mac.
How full is your Mac's hard drive?
Locate your iMac's hard drive icon on the OS X desktop. Click the icon once, then use the keyboard key combination Command-I. This will give you additonal info about your iMac's internal hard drive.
How many applications do you run simultaneously in the background while working in another application?
If you have a long list of user login/startup items that launch at startup/login, you need to reduce the amount of these to around 6 or so items or less, if possible.
Do you have any unnecessary antivirus installed on your iMac?
Have you updated all of your installed software and updated all connected third party device software and drivers?
Have you updated all of the various web browser plugins you that have installed within your web browser?
Do you use Google apps, like Chrome and Drive?
Ditch ALL Googlewares. They are ALL a serious resource hog on the OS X system.
https://support.google.com/chrome/answer/95319?hl=en
https://support.google.com/drive/answer/2375081?hl=en
If you do not like Apple's Safari web browser, download, install and try Mozilla FireFox, instead.
The current, up-to-date version of FireFox is fully compatible with OS X and is regularly updated by the great developers of the Mozilla group.
I have, also, stopped using the Google search engine, regularly and use DuckDuckGo as my default search engine.
It would help us to help you if we could have some more technical info about your iMac.
If you like, please go ahead and download, install and run Etrecheck.
Etrecheck was developed as a simple Mac diagnostic report tool by a regular Apple Support forum user and technical support contributor named Etresoft.
Etrecheck is a small, unobstrusive app that compiles a static snapshot of your entire Mac hardware system and installed software.
This is a free app that has been honestly created to provided help in diagnosing issues with Macs running the newer versions of OS X.
It is not malware and can be safely downloaded and installed onto your Mac.
http://www.etresoft.com/etrecheck
Copy/paste and post its report here in another reply thread so that we have a complete profile of your Mac's hardware and installed software so we can all help with your Mac performance issues.
Thank You.