The thing with washing diapers is that you want to get them clean but if you use too much detergent or the wrong kind you'll get buildup on your diapers that cause them either to stink when they get wet or quit working. Diapers made with natural fibers are easiest to take care of. Diapers with synthetic fibers are the ones that tend to have more problems with washing.
Here's how I wash all my diapers (natural and synthetic):
If there are especially dirty diapers in the load I will shake the bottle of liquid detergent upside down quickly and then rinse out any detergent that sticks in the cap into the rinse water.
Sometimes I do an extended soak and sometimes I just set the soil level to heavy.
Sometimes I do an extra rinse if I think the detergent isn't going to wash out with one rinse.
You should put the detergent in for the hot wash (after your first cold rinse).
You want to avoid fragrance, brighteners, fabric softeners and other additives. These leave buildup on your diapers. Cheap free and clear detergents have worked well for me, but they sometimes have an added ingredient to block allergens that causes some people problems.
I think the key is not to use too much. A diaper store in town recommended that I use about a tablespoon of a free and clear detergent and a half cup to a cup of baking soda.
Sometimes I add a few drops of tea tree oil to the hot wash as an antiseptic.
It's best to start with a simple wash routine and only adjust if you have problems. If your diapers aren't smelling clean out of the wash you need more detergent. If they repel instead of absorb or stink when they get wet you need to use less detergent and/or do an extra rinse. If you have hard water you may need a few other adjustments.
Here are some good websites with info about washing and detergents. The diaper pin forums are a good place to go if you are having problems and want to find out how other people solve similar problems.
Sunshine Diapers - Washing Info
Sunshine Diapers - Detergent Info
Pinstripes and Polka Dots - Detergent Info
Diaper Pin Forums