Scratching was the act of scraping one's nails or claws against an individual or object. It could be done to inflict an injury or damage or to relieve an itch. Cats could make use of a scratching post to satisfy their need to scratch things.
In 2370, Geordi La Forge described Spot's erratic behavior to Data, noting, "Half the time I wasn't sure if she was going to lick me or scratch my face off." (TNG: "Force of Nature")