You can't do a processor upgrade on an iMac, afaik. Depending on which model iMac you have the max RAM you can install is anywhere from 512MB-1GB. You can look up your model here:
Gus is Right you can but you will be stuck with bus and video specs that came with machine if iam not mistaken. so if this is for you i would look into a newer model where you get faster cpu,bus,video and after 350mhz they had better speakers and a total see through enclosure,optical mouse etc. Heck they are selling classics brand new 600 mhz machines for $790 with latest greatest software. I know this cause i had a 333 i gave to my son and my wife uses a 500. Skip the upgrade and find a used 500 if money is an issue.