Clean up solids and liquids promptly. The longer something sits, the greater the chance of its staining or damaging the finish. Use natural cleaning solution, like my Almost Everything Cleaner, to clean off any residue. If a pet keeps using a favorite location, you may want to treat the area with an enzyme-based pet-odor neutralizer to get rid of the traces you can’t smell but that make your pet recognize it as the “right” place. I’ve used gallons of a product called Nature’s Miracle over the years.
You may be able to reduce or even remove dark stains on wood floors by pouring hydrogen peroxide on them, covering them with a moist rag, and checking every 10 minutes or so. Either add more hydrogen peroxide if the stain remains or blot the area dry if it is gone. Once everything is dry, you can sand and refinish the surface if necessary.
When your pet messes on carpets, mattresses, or furniture, remove solids and immediately blot up as much of the moisture as you can with newspaper or old towels. I find treading on the absorbent material speeds the process. If you and your pet are in "training" mode, put the soiled paper where you want him/her to potty in the future. Rinse the soiled area (remember the accident may have spread sideways in the carpet padding, so go a bit wide); thoroughly clean with cool water (hot water or steam may set the stain); and blot that all up with more clean towels. A wet vac or shop vac is great for getting up the majority of moisture before blotting dry. If you’re very quick in getting to it, this may be all you need to do.
In most cases, though, you'll need to do more to completely remove the odor and reduce the chances of repeat soiling. If you can’t pinpoint where a lingering smell is coming from, buy or rent a black (ultraviolet) light, which helps reveal invisible stains. Enzyme-based cleaners are particularly helpful in removing pet urine. Before applying, use plain water to flush out and blot off as much as possible of the soaked-in substances—including cleaning products that may have been applied previously, which may interfere with the enzyme cleaner.
Be especially careful on natural-fiber fabrics, because enzyme cleaners may damage them; test on a small, inconspicuous area first. To use, just saturate the affected area with a generous amount of enzyme cleaner (about the same volume as the original accident contained), let it soak in and sit for at least the minimum time suggested on the bottle, and then blot the area dry. Use a fan to finish the final drying so you don’t end up with mildew to boot.
A note about enzyme cleaners: They can do wonders to eliminate odors, but some common cleaning enzymes, called proteases, can trigger asthma attacks. If someone in your home is asthmatic, stick to using clean water and a wet vac on the stain. You can rent an extractor (a wet vac on steroids) from a local store to help the process. Before using it, add a few cups of white vinegar to the water to help clean the stain and to prevent someone else's toxic cleaning products from winding up in your carpets.
Some badly abused areas or objects may never be odor free again. You may have to remove and discard carpet and padding, or even sections of wood floor that have been saturated multiple times, but it's worth giving these remedies a try before giving up.
Launder pet-soiled linens, clothing, and other washable items that will fit in your washing machine using your normal detergent plus a cup of vinegar or half a cup of baking soda, washing soda, or borax, or with a detergent formulated to launder diapers. Line-dry them in the sun and the odor should be gone. If peeing on a bed is a recurrent problem, drape a rubberized sheet over the covers to protect bedding, or try a covering with a crinkly waterproof tablecloth, which will not only protect the bed but may also be unattractive underfoot to the pet.