Being a naturally lean person helps with this. If you’re not, you can still achieve this with a low fat diet and plenty of cardio work. Walking, running, swimming etc should do it. If you’re into fitness, interval training is excellent.
The next step is to build the abdominal muscles, the most effective for this are bicycle crunches, you may only be able to do 10 at first (doing them in rhythm quickly is even harder) but after a while you should be able to reach 30 reps. Maintaining the diet, cardio and abdominal exercises is the sure path. The ab exercises aren’t essential after you build initially, so can be done occasionally to keep them toned.