The stains can be removed by using a stain and odor removal product from your grocery; or get a professional Carpet cleaner to do it properly. Usually I use to keep a liquid in the bottle containing white vinegar in a spray bottle and spray it on all the area containing the stains until the carpet is wet and let it stand for several hours so that the odor can be neutralized. Apart from this I used to do regular vacuuming.