A man coughs to clear his lungs. Generally, any sickness that results in congestion can lead to frothy sputum.