There are many ways to wash cloth diapers. You'll eventually work out your own favorite system. The brand you choose may have particular recommendations. We let the whole mess soak at least a few hours or overnight. Then we rinse and spin them and do a complete hot wash cycle with just a bit of detergent.
Some people like to do an extra rinse.
When washing your cloth diapers, do not use bleach. It breaks down the cotton fibers and the residue is bad for baby's skin. If you feel you really need it for whitening do all of your diapers in a bleach load every 6-8 weeks and rinse at least twice. Do NOT use fabric softeners on your diapers. They will lower the absorbancy as well as leave a residue which may irritate baby's bottom.