Dogs can become nervous or anxious about new situations, changes, being left alone, loud noises or many other things. Your dog may handle its feelings in many ways. Some dogs respond with displacement behaviors.
Terry Marie Curtis, DVM, MS, DACVB, from University of Florida College of Veterinary Medicine, explains that displacement behaviors are the result of a dog having a conflict about what to do, so it does another behavior. For example, your dog may feel anxious about people coming in your house and want to both hide and greet them. Instead, it turns in circles.
Dogs may do many types of displacement behaviors including excessive licking of carpeting, furniture or other objects, turning in circles, barking, excessive grooming and pacing.
Some of the behaviors can cause injury such as licking itself so much it damages the tissue or causes gastronomical issues due to ingested hair.
If a displaced behavior continues, it can become compulsive so that your dog does the behavior all the time instead of just when it is nervous.
Stop your dog from the behavior and give it something else appropriate to do such as fetch or go into safe crate. Exercise your dog and do obedience training so you can build confidence. Consult a veterinarian if your dog's behaviors get worse.