By practicing good dental hygiene. Brush after eating, and floss daily.
Bad breath is the odor of certain sulphur compounds, which are created by bacteria in the mouth. Brushing and flossing will remove bacteria, but the mouth is never entirely free of bacteria, and they multiply if left to themselves. That’s why you must brush and floss often.
Include your tongue when you brush, especially the back area where a mucus layer develops that hides bacteria.
If you have a dry mouth, consult a dentist on how to increase the saliva flow. Adequate saliva benefits us by cleaning the mouth, removing particles that can create odour.