If you're interested primarily in learning the rules and can't find a group, consider playing video games rather than reading through books. To learn 3.5, consider Temple of Elemental Evil, which faithfully implements most of the game's core mechanics, including classes and feats from the Player's Handbook. It's slow to start, so I never got into it. However, it's gained enough of a following to have significant fan-made mods, and it does a great job of explaining where the bonuses or penalties on each roll come from.
Another turn-based 3.5 game is Knights of the Chalice. Because it focuses almost exclusively on combat, it only features three classes: the fighter, the cleric, and the wizard. The rules also differ slightly from 3.5. However, they're close enough that it provides a great introduction to the tactical side of the game and many of the feats and spells in the core books.
If you're comfortable with real-time-with-pause games, you have other options. These include Neverwinter Nights 2, which offers four-person parties, a range of classes and prestige classes (3.5's non-mandatory paragon paths), and a cast of characters to recruit.
For 3.0, try the original Neverwinter Nights, which puts you in charge of a single character. It used to have a large modding community and servers for meeting and gaming with other people, but I don't know if that's still the case.
Icewind Dale II also is based on 3.0's rules. It's a real time with pause game that asks you to create a party of six characters and guide them through a series of battles. While your characters' alignment, class and race will affect the dialogue options you receive, the focus is on combat.
For Second Edition, consider Baldur's Gate II or its predecessor. Both games use a real-time-with-pause engine, so they don't implement the rules perfectly. However, they'll still teach you about the edition's attributes, classes, magic system, multi-classing system, and monsters. Between the two, I would recommend the second, especially if you prefer to play spellcasters; it starts you at a higher level, so you have more options.
Several other games use the same engine and comparable rulesets. These include Planescape: Torment, which has a great setting, interesting dialogue and intriguing recruitable NPCs, and the original Icewind Dale, which lets you create your entire party. Like its sequel, it focuses almost entirely on combat.
For turn-based implementations of Second Edition or AD&D, consider the Gold Box Games, which allow you to generate a party of adventurers. I would also recommend Dark Sun: Shattered Lands, for its gritty setting, unusual races, and psionic characters. You can buy it on eBay as part of the Advanced Dungeons & Dragons Masterpiece Collection.
The Second Edition and AD&D games do a poor job of explaining the rules in game, and some of them have only vague descriptions in their manuals. Fortunately, Dan Simpson's AD&D Rules FAQ provides a great overview of the rules they use.
You should play in a game if you can, even if it's only a one-shot with a 4E group. But if you can't find a group that's interested in older editions, these games offer an entertaining way to learn about the game's history.