It may be coming from your teeth or gums,it can be due to improper cleaning of teeth, tongue, decayed tooth present in mouth, sometimes due to some systemic problem, but usually it's from bacteria colonizing on the back of the tongue.
Bad breath can be treated by treating the cause i.e. getting your teeth cleaned, filling of cavities, removal of badly decayed teeth, taking care of systemic problem combined with mouth wash prescribed by your dentist and in some cases taking the bacterial culture from the tongue.