Grow plants that cats don't like. The I Must Garden website says cats particularly don't like rue (Ruta Graveolens). Rue is a perennial plant that grows to approximately 2 feet wide and high, with attractive yellow flowers. Another option is to plant rosemary around the perimeter of a lawn, as this also repels them.
Remove existing cat feces and the soil around it with a spade. Cats mark their territory by depositing pheromones from their scent glands and will continue to return when their scent remains. By removing this, the cat may go somewhere else.
Provide a constantly clean kitty litter box, if it's your own cat who is the culprit. Cats like kitty litter and may then prefer the box instead.
Spray or spread various spices or scents around the yard. The Adopt A Pet website suggests trying cinnamon, citrus peels, fresh coffee grounds, orange or lemon citrus oil, garlic cloves, vinegar and red wine vinegar. Gardening Know How suggests cayenne pepper flakes or ammonia.
Lay chicken wire on top of an area where cat feces recur. The wire will prevent the cat from digging into the ground.
Use a commercial cat-repellent product. Homemade products, such as rosemary mixed with water, may also work
Install sprinklers that are triggered by motion. Cats hate water, but this method is also expensive.
Cover an area where a cat keeps going with stones. Cats won't go where they can't dig.