To get to a six-pack, you mostly just have to eat a healthy/clean diet and do enough exercise every day. If your diet is fairly clean and you do enough exercise every day, then you should have no problem staying lean. Otherwise, consider doing more (especially in the diet department). Most people in the first world are very defensive of their diets and consider it a very personal matter, which is really bad considering the first-world obesity crisis. I'd advise you to first take a step back and look at what you are eating every day, especially in relation to the kind of exercise you're doing. If you're eating junk food (potato chips, ice cream, fast food, etc) on a daily basis, then you're probably doing it wrong. I was able to become a lot leaner by just eating fruits like Oranges, Watermelons, Pineapples, etc. rather than eating junk when I was hungry.
There are some other factors like how much muscle you have and your genetics that can determine if you have a six-pack or not, but most people will have a six-pack if they're just lean.