They say good coffee starts with the beans. However, that isn't quite true since if you have a dirty coffee maker it doesn't matter what the beans are. Start with good coffee beans AND a clean machine. This is especially true if you are making espresso and espresso based drinks such as a latte!
Take the machine apart. Espresso makers will have a few different parts that come off. All of these should be removed. This should include the filter and mechanism that holds the filter. It will include the pot and the lid of the pot. It also should include one to three removable parts of the steam wand (the more the better).
Wash all removable parts. Using hot soapy water wash all removable parts. This should actually be done after each cup of espresso based drinks. If you don't use the steam wand you don't need to clean its parts.
Clean the inside of the espresso maker. To clean the inside of the espresso maker and to remove minerals that build up from the water run one pot worth of distilled vinegar through the espresso maker (use the filter, holder, pot, and top for this process or you will have a mess). Once you have run the vinegar through you should run two pots of regular coffee through.
This should be done once a month if you use your espresso maker one time a day or less. If you use it more than once a day, clean it every other week.
Keep the steam wand as clean as possible. A steam wand is hard to keep clean if you aren't careful. It builds up steamed milk that can and eventually does burn. This can cause bad tasting milk. The best bet for keeping it clean is to have a very moist rag with a bowl of water handy. Clean the wand right after you are done steaming milk. This will help prevent a build up.
Clean the steam wand. When you clean the pot with vinegar you should also do a thorough cleaning of the steam wand. When your espresso machine is done "brewing" the vinegar use what is left in the machine to "steam" a cup of vinegar. This will loosen any materials, clean out build ups, and disinfect. You can then use a rage to scrub it all clean. Check any rubber gaskets, the bend in the wand, and any ridges. You can clean these with a brush, a scratchy, or your finger nail. Finally, run fresh water steam through it before you are finished (after the second pot of water runs through the machine).
Let all your parts dry. Before putting everything together let it all dry. Keep the filter from the basket, don't screw on the top to the machine, and let the wand parts sit apart to dry thoroughly. Once dry put everything back together.
Good tasting coffee really starts with a clean maker. Nothing can ruin a cup of coffee worse than a dirty pot, maker, or steam wand. Keep it all clean by cleaning separate parts and your wand after each use. Do a thorough cleaning once a month (twice if you use your espresso machine a lot), and have fun with it!