Cleaning carpet stains with hydrogen peroxide is simple.
Use 3% hydrogen peroxide on stains. Spray or pour peroxide onto the stain. Let it sit, then remove with a sponge or cloth. (Put clean cloth over the area and apply pressure, to pick up the liquid.)
If any of the stain remains, repeat the treatment.
Here's a YouTube video showing cleaning a carpet stain using 3% hydrogen peroxide. Note that they do NOT let the peroxide sit and work (which would be more effective than applying it so many times as they do). It's a bit long and maybe belabors the point? So, feel free to just watch the first part, not the whole thing, if it interests you.
Removing stains and odors is one of the basic uses of hydrogen peroxide. It is used to remove stains and odors from lots of different things -- such as tennis shoes, laundry, plastic, upholstery, and carpet.
I've use it clean cat barf off of carpets, and to deodorize cat litter boxes, compost buckets, and my trash cans!
Here's a link to a professional carpet cleaning service in Santa Cruz, California (USA) that uses hydrogen peroxide and sodium percarbonate to clean and deoderize carpets, upholstery and stone and grout floors! Their post about "the wonders of hydrogen peroxide" includes a link back to this site. Check out what they have to say the power of peroxide on stains and odors.
In case you are still feeling skeptical a bit about using hydrogen peroxide for removing carpet stains, consider that there are many commercial products that are sold for this purpose. These cleaners generally use sodium percarbonate, which is like a powdered form of hydrogen peroxide. Sometimes they have "oxi" or "oxy" in the name (short for "oxygen"). (Peroxide breaks down to oxygen and water, and oxidizes stains and odors in the process.)
There are lots of commercial products that use peroxide or sodium percarbonate-- these are just some examples.
--advertisements for "oxy" products from Amazon--