I usually recommend not cutting the yarn if you can avoid it. Sometimes the cut edge will start to fray making the unraveling even worse. If you have pets, they love to find small damaged areas like these and start picking at them until they become an expensive problem. If it's only a few loops, I would recommend using a pair of scissors or a small screwdriver to stuff the snagged loops back into the carpet backing. If it's a larger area, I agree with Jim, hire a professional.