Most cats spend a considerable amount of time grooming their coats. As they groom, they can swallow hair, which may build up over time in their stomach. If the hairball doesn’t pass from the stomach, the cat will attempt to eliminate it by coughing or gagging.
Many cats will get a hairball at some point in life, but some kittens, such as long-haired breeds and cats that groom excessively, are especially prone to hairballs.