For the most part, stains will come out with a little time in the sun or on the next time through the wash. I have no idea how the sun works its magic, but it’s seriously amazing.
However, if some of your diapers come out a little stained. I do NOT recommend just throwing them in again with the next wash load. Particularly if the next wash load contains a pair of blue jeans. Because that extra wash will probably get rid of the slight yellow staining you had and instead replace it with this: