Directions for closing an account on an online service are often buried deep in a website and impossible to find. WikiCancel is a wiki page that lists the cancellation procedures for popular services, subscriptions and contracts.
WikiCancel works like any other wiki page. Click a link for a service you want to close, and WikiCancel shows you exactly how to do it. It looks like a few obvious services are missing, and some are only relevant if you're in the US. Feel free to add to the list to make it better.
As for the bulk of your online accounts, check out the previously mentioned AccountKiller. If you've managed to forget where you even have accounts, dig through your email or old passwords to find services you have forgotten.