This activity is known as personal grooming or preening, a form of hygiene.
For example, combing through the hair or feathers, ensuring they lie smoothly against the skin, and extracting foreign objects such as insects, and leaves, dirt and twigs, are all forms of grooming.
Among animals, birds must preen each of their feathers daily to remove parasites, keep them in good aerodynamic condition, and oil them.