If using Safari v4 or v5, go to this address...
http://www.youtube.com/html5...and join the HTML 5 Beta. Wherever possible, videos will then use HTML if it's available - bypassing Flash Player.
If you prefer to use Flash Player, have you checked it's as up-to-date as possible? Adobe have now stopped supporting PowerPC Macs, so the last version available is
v10.1.102.64 - check here which version it currently has installed...
http://www.adobe.com/software/flash/about/(see the "Version Information" panel)
I have the 10.1.102.64 installer file if you need it - Adobe have made it all but impossible to find on their website - the newer versions of Flash Player are Intel-only, so the highest your iMac will ever run is 10.1, unless Adobe have a change of heart (unlikely)! PM me if you need it.