How do I analyze my game after playing? What techniques do you use to analyze your games or other people's games?

How much time do you spend on analyzing the game?

Are there any tools (electronic or manual, such as a piece of paper) you use during analysis?
Analyzing your own games is the best and fastest way to improve in my opinion.  

As soon as possible after the game, write down the variations that you were thinking about during the game, especially the ones that were not played.  This will be useful when you come back to the game after days, months, or even years.  As you improve, it will be helpful to see what you were thinking during the game.  That way, you can pinpoint how you can improve your thought process in future games.

When you start analyzing, use a chess board, but don't use an engine at first.  Look for moves where you made a mistake or missed something important.  If you lost material, go back and find the moment where you blundered.  If you got into a bad position, try to identify the moves that led to that position and evaluate some alternatives.  Put everything you come up with into your chess program/database (you are using some kind of a database, right?).

After you've gone over the game "by hand" (this should take at least half an hour for a slow game, even more time if it was a complicated position), now it's time to use a chess engine.  Go through all of the moves and take note of where the engine says that you either made a poor move or missed an opportunity for a better move.  Again, add variations to your database.  If it's not clear why something that the engine suggests is good, investigate it further.  Try out some lines and see what the engine says.  

At this point, you have an awful lot of moves in front of you.  Now it's time to try to take away some lessons from the game.  Go back through the game again and decide what specific thing you could have done better.  Did you make a very poor positional move?  Did you blunder material?  Did you neglect development?  Did you put a piece on a bad square?  Asking questions like this will help you in future games during the game.  

The last thing that you can do is to ask a stronger player for help.  Bring all of the information you have to the stronger player and then go through the game once more.  The stronger player can give you suggestions for how to think in certain positions.  Basically, a chess engine can tell you what the right move is, but a stronger player is often needed to tell you why a move is correct.  

You should try to develop your own analysis style as well.  If you are a strong tactical player, try to go through the game without making moves on the board, just analyze in your head.  If you are good at endgames, switch colors and analyze where your opponent went astray in the endgame.  Hopefully analyzing games is fun and not a chore!



Additional thoughts

I didn't mention studying the opening moves because that is less important than finding the specific points in the game where you made a mistake.  After you have looked at the game as a whole, studying the opening can often help you as well.  The best way to do this is to look for grandmaster games in the same opening that was played.  Find out what moves are commonly played, and then go through some games of stronger players in order to find good, general plans for the opening.  Try to see where you varied from these plans and determine why you didn't do what the stronger player did.  This is much more important than memorizing moves (although you will probably find that you've memorized many variations just as a matter of course!).