Like the last poster, I would recommend Pokemon Showdown for online battling (with formats for different generations). I haven't tried Pokemon Online, so I can't comment on that one.
If you're looking to trade with actual people, an MMO probably isn't what you're looking for (plus, I don't know of any decent ones right now anyway; the last one I tried ended up being virus-ridden). There's no way to trade/battle with people online via the older games, but if you wanted to invest in a 3DS (or 2DS) and one of the newer, wifi-compatible games (X, Y, Omega Ruby, or Alpha Sapphire), I personally think the mix of nostalgia, interaction with others, and new adventures offsets the startup cost. (Plus, once you have a 3DS, you could buy a $10 digital copy of Red, Blue, or Yellow for added nostalgia, though I think those only offer local wireless trading.)
If you're looking for people to trade with, there's a pretty good community here (check out the trading portion of the forums), and a lot of people battle as well. This forum seems friendlier/more supportive to me than some of the other ones I've seen, so especially if you're new and just getting up to speed on all of the changes to Pokemon over the past several years, it would probably be a good place to start.
If you want to trade or battle in person, I think the Pokemon website also has a list of local clubs and events you could check out, depending on where you live.
Diamond FC: 1504 2172 1147
White FC: 1721 2860 5156
3DS XL FC (X): 2466-2669-5197