I've been wanting to start playing D&D for some time, and I was wondering how I could get started by myself with relative ease. I own the first two player handbooks, and a set of dice.
Dungeons and Dragons is very much a social game. As such, there is no real "by yourself" to it. The only things you can really do separate from a group in D&D is to educate yourself on the rules of the game, and prepare for whatever sessions lie ahead.
Toward that end, I recommend two things primarily:
In the end, if you really want to get started in D&D, you'll have to find a group. For this, head down to your FLGS (Favorite Local Gaming Store) and inquire about the local games. Chances are, there's a few that are run right in the back room of the store. You can also search various places online.
When you do find a group, prepare for your first session with the following:
Some essentials to have on hand:
Additionally, if you want to get a feel for the flow of a real D&D game on your own, there's several websites that have podcasts of actual D&D game sessions available for download.
Two things you might consider- D&D Encounters (a program that generally runs on Wednesdays at your local game shop) and Living Forgotten Realms were created specifically to address people who are interested in playing D&D but don't know anyone to play with yet. Look into joining an Encounters group and see if you can't make friends with fellow players that way.
To answer the question, especially in a non-critical light, there are quite a few things possible to do with solitare D&D. While it is a social game, there are many elements that can be simulated, especially if you don't have the ability to game with others. Though I do recommend looking at online gaming (on this site and elsewhere), the game can indeed be played as a solitaire exercise, especially with the cooperation of a site such as this for support on rules questions and clarifications.
First, DDI has a solitaire game, which I quite strongly recommend:
For battlemaps, I personally find making a map and throwing it on Google Wave with the RPG-Bones battlemap is quite effective, and using iplay4e combined with old characterBuilder characters the best way to track the numbers. I hope that I can recommend the new CB soon, as you'll need a DDI subscription to get the solitaire game, but...
Once you've gone through those two, the best practice is to grab adventures from DDI and the web in general and run them for the tactical encounters. Just like playing chess solo, getting in the right mindset to run everyone is tricky but can be quite fun when you achieve it.
Good luck in your solitare play and if you have any questions, don't hesitate to ask.
--- Edit, more details ---
When playing a solitaire campaign by myself, here's what I do. Note, this is a tactical campaign. IF I wanted a RP campaign, I'd write a book (that's for a different question):
You can try the Starter Kit for D&D 4e, it has a solo campaign that teaches you about the rules. It's not that expensive, and gives you a simplified rule book and a couple of campaigns to ease you into the rules, character creation, and eventually being a DM.
The solo campaigns are like "Choose your own adventure" books, and send you through the story line based on your choices and dice rolls.
The drawback is, the set has a lot of errors, typos and isn't as nice of an introduction as I was hoping for. The free additional solo campaign that is available for download is even worse when it comes to errors and typos.
An alternative to playing by yourself would be to subscribe to one of the many fantastic live-play podcasts which are recordings of a group of people playing D&D. Personally I'm a huge fan of the Critical Hits podcast from the folks at Major Spoilers, the Icosahedrophilia podcast and for a shorter, video podcast the Penny Arcade video podcasts (with Wil Wheaton) published by Wizards of the Coast themselves are also fantastic.
All three are easily found via the iTunes podcast search.
There are dozens of others but those three all have the advantage of being exceptionally well recorded and edited - meaning as a listener you can concentrate on enjoying the story - and on learning via listening to how these DM's run 4e.
Of course any game you start or join will play differently depending on your DM and group and play decisions & style, but those three podcasts all are a good way to experience D&D 4th ed by yourself.
I considered this myself when I started playing, however D&D is a social game designed to bring players closer together. The DM is necessary in the game – you must have one and a player can't really DM and play at the same time.
One player and one DM is not exactly an exciting game – however, it is still playable. D&D is aimed at around 3–5 players.
You can play solo D&D, though I recommend playing with others. You can play online using Google+ and the community is, from what I've heard, very active. You would need a webcam and microphone, which are not very expensive anymore and many laptops come with integrated webcams at least.
As for solo D&D, check out various free modules available online. These "canned adventures" have all the adventure details written out so you don't have to make things up. Depending on the writing style of the author you might also get advice on how things in the module will react to different player actions (if the guards at A sound the alarm, reinforcements will come from B and C, etc).
1st edition AD&D dungeon master's guide came with tables for randomly generating a dungeon and populating it with monsters, treasure, etc. Dizzy Dragon: http://www.dizzydragon.net/adventuregenerator/gen among others, has created an online tool that outputs the same information. Just select d20 Pathfinder from a dropdown box and a party level to get a 3rd edition dungeon. It might look sorta compatible with 4e if that's what you play. It defaults to 1st edition, which is very compatible with 2nd edition.
The 1E DMG also has a wilderness generator, which I haven't seen online.
There's a problem with a random dungeon generator though, that it doesn't capture the incredible variety of material a real DM will come up with. Modules are a little better, but many rely on the player not knowing certain secrets. The module of course gives you all the answers, because it's supposed to be a DM aid. Noticing things, critical thinking, and problem solving are a big part of player skill. Learning from modules for D&D is a little like using math workbooks to learn math, in the sense that it helps get you started but you'll find it's different when you have to think on your own.