Cut a replacement piece of carpet, slightly larger than the size of the damaged area of carpet, using a utility knife or carpet cutter, in a triangular or square shape. Cut the replacement piece from carpet leftover from the initial installation, or either cut from a hidden spot within a closet or beneath a piece of furniture. Make certain that the replacement piece is not faded and that the carpet pattern runs in the same direction as the piece you are replacing.
Set the new piece of carpet on top of the piece of carpet to be replaced. Cut around the new piece, down into the damaged piece, using the utility knife or carpet cutter. Do not cut into the underlay, the layer of padding beneath the carpet. Remove the old piece of carpet.
Cut the carpet tape into a size matching the replacement piece of carpet. Peel the paper backing from one side and stick the tape onto the underlay. Peel the paper backing from the side of the carpet tape that now faces up.
Run a bead of carpet glue around the perimeter on the underside of the replacement piece. Press the new piece firmly into place, making sure that the fiber direction matches the existing carpeting surrounding it.
Allow 24 hours for the adhesive to completely dry. Place a chair or other piece of furniture, such as a small table, over the new piece, to protect it from foot traffic. Vacuum the new piece of carpet and the surrounding area.