What is the best way to flatten your tummy and lose weight?

I’m trying to lose weight, and i get all the exercise i need because i play softball and i have a p.e class at school, but i can’t seem to lose any weight, because i just keep eating. and i dont know what to do or eat or whatever. any help?