Maybe RAM, depending on how much the machine has already. 128MB should suffice for running OS X up to version 10.3 "Panther".
I would recommend going for at least 10.2 as that was the first, fully stable release of OS X, (I've heard that earlier versions can be slow and buggy). For running later versions like 10.4 I would strongly recommend a 400MHz slot loader as they are incredibly good machines for the job. With 256MB RAM, 10.4 chugs along nicely on a 400MHz iMac, and with more RAM it is pretty speedy. Also, the slot loaders use PC100 (and possibly PC133) memory which is very easy to get hold of cheaply these days.