Cats scratch to sharpen their claws and leave their scent.
Cats have pheromone glands on their paws. This leaves your cats scent on the items they scratch. Cats love their environment to smell like them. Scratching makes your cat more comfortable.
You may notice that your cat will scratch when they see you because they are happy and excited that you are home. Don’t yell at them in response to their excitement!
All cats must have vertical and horizontal scratching options available. You can show your cat how to scratch and they will often realize what you are doing, get excited about it, and follow suit!
If your cat is scratching furniture and you would rather this not happen, put a scratching post right in front of the place your cat likes to scratch. I never recommend declawing a cat as it is quite cruel and can cause other behavior problems.