if could be any of the following
Blood clot in the lung
Bronchiectasis
Bronchitis
Cancer
Cystic fibrosis
Goodpasture syndrome
Inflammation of the blood vessels in the lung (vasculitis)
Inhaling blood into the lungs (pulmonary aspiration)
Irritation of the throat from violent coughing
Nosebleed that drips blood down into the lungs
Laryngitis
Pneumonia
Pulmonary edema
Systemic lupus erythematosus
Tuberculosis
You need to see a doctor. There are several things this can be. The first is bronchitis or pneumonia. Your doctor can tell you what is going on for sure and get you the proper treatment.
Take care.