Trim the edge of the carpet with a utility knife, leaving about 1/2 inch extra against the wall. Cut off any excess yarn with a pair of scissors.
Apply seam adhesive to the extra 1/2 inch of carpet. Fold this section underneath the edge of the carpet and press it down so it's flush with the wall.
Run over the carpet edge with a carpet roller. Walk along the edge of the carpet to make sure it is flat and the adhesive sticks properly.
Apply a binder strip to a threshold such as a doorway so the carpet doesn't stick up.