During the course of cooking me a Valentine's meal, my dear husband put a hot oven shelf on the kitchen carpet, with the result we now have a lovely brown line, right as you come into the kitchen - not a good look! Did I read somewhere that you can use ice cubes on burns in carpets, or was that for something else like wine stains? BTW, the meal was delicious!!
There are lots of different suggestions on this site (basically they recommend trimming off the burnt tips of the carpet if the burn is not too deep or cutting out the burnt area and glueing in a replacement section from another part of the carpet or from a left-over piece):-