It is very easy to keep staining material away from the teeth. If you want to avoid exposing the teeth to staining material, simply do not put any staining material in your mouth. To do this, however, you need to know what kinds of things stain the teeth, so that you can avoid them properly.
Drinks: Tea, coffee, grape juice, and colas (dark soda) will stain your teeth very quickly, especially grape juice and coffee
Tobacco: Any form of tobacco will stain your teeth faster than anything else; keep it away if you want your teeth to stay white
Foods: Curry, berries, soy sauce, etc. will stain your teeth quickly.
If you want an easy rule to go by, think of what you are considering putting in your mouth. If it will stain a carpet or T-shirt, then it will stain your teeth. So, avoid it.