Our first lesson is that if we have bought a new carpet, have the installer leave the "remnants" of the same carpet, just in case.
This is not only useful in repairs, if the remnant is large enough, you can utilize it where a "most walked" are of your carpeting has become noticeably trampled or discolored.
A burn from a cigarette can become simply. I would not recommend scissors or box cutters to work on these. More easily seen and controlled is a one-sided razor blade (or a two-sided blade with one side heavily taped to avoid cutting oneself). Most other cutting tools will not give you close enough visible focus to do a more perfected cutting.
With the razor blade, slowly, cautiously and with little pressure, rub the sharp blade against the burn marking. Therefore, you can remove the burned portion of the rug without removing the unburned portion. Often this will be enough once you fluff the carpet a bit.
If more repair is necessary, use glue that is more permanent, put the glue on a "Q-Tip" (to not glue outside fibers together). Only put the glue in the cut spot where necessary. DO NOT do this until you are prepared to do the next step, as the glue will not dry too quickly. I do not recommend a glue like "Elmer's" as it will become unstable if the carpet is steam cleaned later.
If not, and you have a remnant, use a pair of tweezers to hold a section of carpet fibers, toward the bottom of the fibers, and cut a small patch of fibers from the remnant.
Put the glue into the offensive spot, quickly cut the fibers from the remnant and gently set them into the hole from the burn.
If you do not have a remnant, an unnoticeable spot will work too. In fact, many carpets run underneath "woodwork" floorboards and those fibers are usable from this area. The outside edge of the inside carpeted closet etc. will also do.
If a larger area is affected, a remnant will almost be necessary (unless you want a bare area under the bed or couch). Although, again, a carpeted area such as a closet possibly utilized, as you can cover the space in such a closeted area with a coordinating linoleum or tile.
Measure the burn area that you need to replace. Do not simply use a square area or rectangle. If the burn is circular, measure it in a circular manner. Once you have the measurement redraft it onto a piece of cardboard or even paper (the paper later transferred to cardboard for its sturdiness.
If the area is primarily rectangular or square, do not adjust for that inch that juts out from the area, you must remove the good carpeting also. If circular, the same applies, you must remove the entire burn spot, even if it means replacing some "good" carpeting.
Put your drafted cardboard over the area and make sure it covers the burn spot completely.
If it does cover, press down and move the cardboard to free any "good" fibers from under it. Now, using a cleanable marker, such as a pencil (no, no, not a permanent Magic Marker, something you can clean later!) Trace the outline of your designated "good area".
DO NOT attempt to cut the carpet yet!
Using a remnant or carpeting from a closet or normally unseen location, you will use the cardboard to mark it ONE THE BOTTOM AREA, not through the fibers top. If the carpet has a pad under it, as most do, do not mess with the pad (if you somewhere along the line cut into it, leave it, it is not a problem.
Now, on the remnant or unseen carpet area (pull this up to use the bottom of it), use the marking AND you can use the cardboard to keep your lines in order. Cut this bottom area of carpet with a carpenter's utility knife.
Take this cut carpet (fiber side up) and put it over the burn spot to make sure it covers the burned area completely. Sorry, but if it does not you must go back to Go (in the carpet Monopoly game) without collecting the cash.
If it does cover adequately, again, move it back and forth to release any "good" fibers on the carpet you are repairing from its' grip.
Now, using the replacement carpet itself (DO NOT USE THE CARDBOARD CUTOUT), with a carpenters utility knife, carefully cut straight down into the ruined carpet area. This should now give you a perfect fit, and your movement of the original "cutting forms", should give your regular carpet adequate fibers to "fill" any small gapping..
Again, if you have cut into a carpet pad underneath, do not worry about it (unless you have completely removed it (then just glue it back down).
Now that you have removed the offensive burned carpeting, your replacement should fit exactly into the spot. Again, I would glue it with a permanent glue to avoid steam-cleaning release.
If the area is too large or you do not want to mess with it, your homeowners insurance should cover carpet replacement.