As has been pointed out in the comments, a common cold is already a (viral) infection. By far the largest part of upper airway infections are viral and the body is very capable of clearing them up.
It is a common misconception that that the colour of the mucus gives information about whether it is viral or bacterial. This study shows that the sensitivity of yellowish or greenish sputum used as a test for a bacterial infection was 0.79 (95% CI 0.63–0.94); the specificity was 0.46 (95% CI 0.038–0.53), which is very low.
A visit to your doctor for a cold is almost never necessary. Even in the case that there is a bacterial infection, your body can almost always get rid of it itself. This Cochrane review concludes that in acute, uncomplicated rhinosinusitis (which is, essentially, what we call "a cold") there is no place for antibiotics. It may cause the cold to be over faster than it would be without antibiotics, but without the antibiotics there is a very very low rate of complications. Antibiotics cause adverse events and resistance of bacteria, so they should not be used without reason.
As there is no reason for antibiotics, a visit to your doctor will also not be useful.
A subsequent upper airway infection with coughing is often caused by something called post-nasal drip (essentially mucus from the nose dripping into the throat), which sucks but doesn't warrent a visit to the doctor. Signs of a possible pneumonia are: fever for >3 days or recurrent fever after a few fever-free days, dyspnea or wheezing (this is based on the Dutch guidelines so I don't have an English source for this). In this case, I would definitely recommend going to your doctor. There is still a realistic chance that you're not going to need antibiotics, but that is a decision the doctor needs to make based on the specific circumstances and this cannot be assessed over the internet.