This is a very difficult problem, and the answer depends on how determined that cat is. For example, a cat that lives in an apartment around which there is only a small patch of garden nearby to act...
I've tried several methods. I've put a wire mesh over top of it and each time I caught her trying to than I would spray her with water. She eventually learned not to.