How do I know if its a cold, pneumonia or bronchitis?

Difficult... It is difficult to know which of these you have based on symptoms alone. A typical cold has less severe symptoms compared to the other two; less severe cough, usually no fever, more nasal congestion. Bronchitis has a more severe cough than a cold but the other symptoms may be the same. Pneumonia has symptoms very similar to bronchitis, although it may be a but more severe. Tests may be needed.
There is overlap. A cold often has congestion, stuffy/runny nose, fever and it's mostly an upper airway infection. Pneumonia is a lower airway, lung infection and has fever, cough, shortness of breath. Bronchitis is inflammation of the larger air tubes in your airway and often has cough, fever. All 3 are often caused by viruses.