The only thing similar to an iMac and a Windows computer is that they both have power cords and the iMac's is nicer.
You do not need to defragment: http://support.apple.com/kb/HT1375
You clear "cookies" in Safari: Safari menu > Preferences > Privacy:
To delete Safari's History: Safari menu > Reset Safari:
Whatever you do, do not download or install any product claiming to "clean up" or "speed up" or "optimize" your Mac. Without exception, they will do the opposite. If you already did, you found the problem. Fix it.
Do not install third party anti-virus software. OS X already includes everything it needs to protect itself from viruses and malware.
Most of all forget Windows. Comparing a Mac to a Windows PC is comparing Apples to ice cubes.
More references for you:
Mac OSX tends to look after itself...
To keep your Mac happy... See these Links...