Any odd noises coming from your lungs when you breathe could be a sign of an infection or blockage. If you hear crackling sounds during breathing, it's a sign that requires medical attention.
There is a chance the crackling could be a symptom of asthma. Closer inspection of the lungs may reveal that the crackling is coming from liquid in the lungs, a sign of pneumonia.
Where the crackling occurs in the respiratory system helps to diagnose the problem. If you can feel the crackle while inhaling, you may have asthma, bronchitis, or emphysema. If the crackling occurs after exhaling then conditions like pneumonia, pulmonary oedema or lifetime damage from asbestos may be the problem.
Seek medical advice as soon as possible. A doctor will be able to pinpoint the exact cause and prescribe medications, such as antibiotics. For home remedies, you can take long, hot showers or sit in a room with humidifier to loosen mucous or liquids in the lungs.