The first thing to try, particularly for small buckles, is weighting the area down. If the leak was relatively recent and the wood is still a little wet, this will help it go back into shape. Place a towel over the buckled portion of wood. Weight this down with a cinder block. Add as many as necessary until the floor flattens out underneath them. Let the blocks sit for a few days, and then examine the area. The buckled portion should be gone. If you don't notice any change after you place the cinder blocks on the floor, this is a sign that the wood is beyond repair.
If the wood is permanently buckled, it will have to be removed. Use a pry bar and start at the seam of the wood. Insert the pry bar in between the seams and pry upwards. You should wear safety glasses and gloves while you are doing this to protect your eyes and hands. Tear up all of the buckled boards, and remove any debris left behind. If the area is still a little wet, it must be dried out before new boards can be installed. Run a fan nearby to help circulate the air.
The area will now need to be patched. Find the same kind of wood boards you used before (when in doubt, oak always works), and have them cut to fit the area. Let the boards sit in your home for around 48 hours before you install them to accustom them to your home's environment; this helps to prevent expansion problems. Nail them into place with flooring nails and a nail gun.
The boards will now need to be stained to match the rest of your flooring. Sand them down with a fine grade of sandpaper first. Find a stain that matches or comes close to the original flooring. Use at least one coat, or as many as necessary, until the depth of color matches the other boards. Let this dry, sand it down lightly again and then apply at least two coats of polyurethane, sanding in between each coat.