The letters often correspond to the up, down, left and right movements in many PC-based video games. In many newer games, it is possible to press two at once for diagonal movement. These controls allow for 8 directions of movement.
In a first person shooter, the A and D keys are generally handled as strafe keys rather than turn left or right, as turning is handled by the mouse.
The WASD key combination was introduced into games to replace the usage of the arrow keys. The WASD keys have two advantages over the arrow keys: 1) They are more comfortable to use when controlling a mouse with the right hand and 2) they are closely surrounded by many other keys that can be used for different functions (IE, "use", "reload", "run", "crouch", and "turn on/off flashlight"). These two advantages have made the WASD setup the default control setting for many games.
As additional gameplay elements have been introduced to the different genres, certain keys neighbouring the WASD cluster have become almost as universal as the movement keys themselves. Actions like run/sprint (left shift), jump (spacebar), crouch (Ctrl), use (E), flashlight (F), drop weapon (Q), and chat/talk (T) are almost always the default in both shooters and MMORPGs, although they occasionally trade weapon-focused keys for window hotkeys, and R (reload in FPS) is usually an autorun key.
Due to their proximity, caps lock is sometimes used as a run/walk toggle and tab brings up the score sheet or task list, depending on the single or multiplayer focus of the game in question.
The placement of your hand on WASD also allows easy access to the number keys, which can be used to select weapons in a FPS and preset abilities or skills in a MMORPG.
The Windows Key Problem
One of the most common issues with the WASD layout is due to the organization of keys on a keyboard - the start menu or Windows key is located immediately beside the default run and crouch keys, and is close enough to the spacebar to cause issues if someone is used to striking the extreme left side of the bar.
As that key is bound to the operating system, hitting in while in the middle of a game causes the start menu to pop open, bumping you out of the game and possibly causing the game to crash or hang on you, depending on the game and how much memory your system has. Many newer 'gaming' keyboards have an option to disable the Windows key, but those people with older keyboards simply have to get used to the layout and utter the occasional expletive when their pinky misbehaves in the heat of battle.