Cat food is higher in fat and protein than dog food making it is as appealing to dogs as ice cream is to us. On the downside, that extra fat and protein can cause diarrhea in the short-term and weight-gain in the long.
Since most dogs will eat it when they can (Pip is nodding), you have to make it so they can’t. If your dog is larger than your cat, you can set the cat's food up in a room rigged so it can only open a cat’s width. An extra long hook and eye or a simple piece of string looped over the knob and a nail on the outside edge of the door molding will do the trick.
But, as this article is being written, Pip is walking around the house looking like a cross between the Goodyear Blimp and a Jack Russell Terrier because of a failure of such an arrangement (although Pip argues it was not a failure but a great success!) Some dogs have Houdini like devotion to a “puzzle.” The door is now chained and even the Amazing Pip should not be able to gain access.
If your dog is small, a gate may effectively block his entrance but allow your cat to hop over for meals. Some gates have cat gates in them, these are great if your dog doesn’t fit through them (Pip reports that, when properly motivated, even a midsized but lean dog can slip through.)
Alternatively, you can feed your cat two meals a day, leave the food down for 15 minutes then pick it up. This can be done in a separate room or your dog can be eating his meal in a crate during that time. This can work once your cat gets used to the program.
Purchase a cat feeding station which is a box that the cat jumps into and then down to the food (or the litter box). These work fabulously well for many dog/cat combos. We used one for years with great success. Ben, our rescued tabby cat, is now too old for jumping around but for over a decade this worked perfectly with all sorts of dogs coming in and out of our home constantly.
You can get an indoor fencing system (citronella or electronic) so your cat can enter the zone but not your dog. (Skip the ultrasonic systems. They may work at first but generally fail as the dog learns nothing worth avoiding actually happens.)
Lastly, you can always feed your cats up high. In the past, we’ve fed ours on the top of the refrigerator but a bookshelf might work just as well as long as it is cat accessible and only cat accessible.