I boil them like pasta on the stove. I only boil prefolds - anything with plastic can melt and wool may felt. I always do at least 30 minutes of them actually being boiled (meaning, that doesn't include the time it takes for the water/diapers to warm up and get the boil going).
The easiest way I've found to do it is in a canning pot, if you have one, because they are so big. I can boil 20 premium prefolds at once in that, whereas my stockpot can only hold about 6 at a time. I only use pots that don't actually touch food for boiling diapers (that's just me though, you probably can use the same stockpot for diapers and soup if you want, because in theory the boiling kills everything).
I do it when I 1) smell ammonia in the diaper pail (or a pre-ammonia salty stink that I've come to recognize) or 2) DD gets a rash. I used to wait until the diapers DD was wearing started to smell, but then I realized that sometimes that was too late and poor DD would start to get a pink tushy. Now that I boil when I smell ammonia in the pail, DD doesn't get rashes anymore. As DD has gotten older and depended more on solids for nutrition, I've had to do it more often. It used to be once in 6 months, now it's about every other time I wash. I think I could get away with it less often if I didn't have an HE washer, or if my washer had a sanitary cycle, though.