For bleached prefolds or any flats:
Wash on HOT (Turn your water heater up if needed)once with detergent, and 3 to 5 more times without detergent, then dry.
For unbleached prefolds:
I suggest boiling them on the stove for about 10 to 15 mins. before washing and drying them as above to make sure you get all of the natural oils out.
After washing and drying your diapers, test one...take a small amount of water and pour it on a diaper...does it soak in or roll off? If it soaks in quickly, you are good to go, if it rolls off, you need to wash and dry your diapers again. Test again, and repeat until the water absorbs into the diaper quickly.