If you have a healthy immune system you can mostly fight off TB after breathing in the bacteria. You will not have symptoms or be sick, because the immune system is able to prevent the bacteria from growing and multiplying. This is called latent tuberculosis. People with latent tuberculosis are not contagious and cannot spread the disease to others. However, anything that stresses the immune system, eg HIV/AIDs or immune suppressing drugs like steroids or cancer treatment, can allow the bacteria to become active and begin to multiply in the body.
Attribution: Avallain