I set my washing machine on the smallest setting and on hot water. You also want it set it on whatever wash setting will provide the most agitation. I used a small amount of soap, although I have read other tutorials that recommend not to. Soap supposedly helps to speed up the felting process. I have also read that you can use a little baking soda, which is supposed to 'improve felting', especially in hard water. I did not use baking soda with my project, but I doubt it would hurt anything to try it.
You may want to consider putting your item in a pillow case or even a tightly-meshed bag to contain any shedding that may happen. This is an especially good idea for smaller items. Also, make sure any loose yarn ends are woven in or tied off. I did not put my bag in anything, but I did leave it inside out just because it sounded good.
Now we are ready to felt...

