Blot the pet stain with a cloth if it is a recent accident. Do not spread the stain around the floor -- just soak up any excess liquid.
Pour a small amount of white distilled vinegar directly over the stain and allow it to sit for about a minute or two. This will help neutralize the odor. Wipe the vinegar off the floor.
Spray an enzymatic stain remover directly onto the stain. These are available at most pet supply stores and many big box department stores. These cleaners are meant to be left on the stain for four to eight hours, but this varies by product. Read all manufacturer's instructions before using a product.
Pour hydrogen peroxide over older, stubborn stains. Spread the peroxide so the entire stain is covered, then tape plastic wrap down over the peroxide. Allow the peroxide to sit overnight, then check the stain the following day.
Repeat this process until the stains and odors disappear. Wipe up the peroxide and allow the subfloor to dry completely before attempting to install new flooring.