Effective House Cleaning Techniques for Carpet Stains: What Works Best?

What are your most effective house cleaning techniques for tackling tough carpet stains? I’m interested in hearing about methods and products that have worked well for you, especially for stains like coffee, wine, and pet accidents. Any advice or personal experiences would be great!