A lot of the old uses for a spare computer (like experimenting with alternate OSs, running test web server, ...) can be done in VMs these days if your main machine is powerful enough (though you obviously don't get to practise dealing with the same hardware issues in the VM environment that you would installing a test OS on bare hardware).
There are some tasks that you don't want on aVM on your main machine though, as they want to be running 24/7, don't want to be disrupted by games and other high power stuff running on the host, and you don't want them affect said high-power stuff either. Things this might count for are running it as a shared file server, a small public web server (assuming your Internet link is such that this is practical) or home mail server.
If the machine is of the same era as your main machine (or others that you have around) then maybe its most practical use for you is as a spare parts service!
Or if you don't already have a good backup arrangement in place for your work files you could perhaps setup an online backup system in it so help safeguard you important files from destruction if, for instance, the hardrives normally holding that data die.
If you don't find a use for it yourself you could try the local school or charity option, though many will not take electrical items (at least officially) because the safety tests that might be required to perform before using it (in a school) or passing it on (via a charity shop or other scheme) might make using it more hassle/expense than it is worth to them.
Another option is freecycle - if your area has a group then someone on there will happily collect it from you. Don't be surprised to see it on eBay or similar afterwards though! Some people get quite annoyed when this happens but I personally don't care - I put things on freecycle to avoid them going into landfill rather than having any human interest in what it gets used for other than landfill (and if it was worth (to me) the hassle selling it, I'd have done that myself). Not wishing to accuse some people on my local freecycle group of not telling the truth, but the massive amount of elderly grandmothers in my area whose TV's apparently blew up the very weekend I listed my old one on freecycle would otherwise suggest there is a major problem with the local electricity supply.
The final option you suggested yourself: recycling. If you take this route make sure the place you send it to recycles the machines in an environmentally friendly way rather than risking its burned remains choking up some river once the rearer metals have been extracted by wage slaves who have to drink from that river.
One very important point before passing the machine on in any way: make sure that any sensitive data (stored passwords, banking details, work related documents they may have composed on the machine, your friends contact details, porn collection, and so on) is properly erased beforehand. A simple "write over with zeros" pass should be sufficient in most cases (who is going to care to use expensive and/or time consuming forensic tests to read the previous data from the zeroed disk?) but you can go much further if you think greater paranoia is warranted.