mince up the food real real small.
Next, don't let him fill his mouth over full. Toddlers tend to OVER fill their mouth and then they can't chew it all... or they choke on it. So it is GOOD, that he is spitting it out... because otherwise, he could very well choke on it. For real. So his spitting it out... is a safety mechanism, which he is doing....and then it shows (you) that he can't chew it well enough, much less swallow it.
Next, fiberous foods or meats or things with skin on it, even grapes or fruit can be hard to chew. So, check on what he is trying to chew. Because anything that can't be chewed, is again, a choking hazard.
Next, if he can't chew certain foods, yet, then don't give it to him. Or he may just not eat. Some kids do that.
But, if you think he has a real issue or problem with chewing/eating, then speak to his Pediatrician.
What kind of "baby food" is he eating? Do you mean strictly pureed foods like in Gerber 1, jars? Or can he eat things like soft pasta or rice or cereal?
If you want him on more table food, make sure he is able to handle the chewing of it. Next, you can try and cook the foods super soft... softer than usual, so that it is more palatable for his ability of chewing. And again, chopping up the food real small.. and only a little in his mouth at a time.
All the best,
Susan