The bacteria causing tuberculosis is called Mycobacterium tuberculosis. It is spread through inhaling tiny droplets from the coughs or sneezes of an infected person. Spread of tuberculosis is facilitated by several factors like overcrowding, living in close quarters like in orphanages, prisons etc. and presence of other medical problems.
Other medical problems that raise the risk of getting tuberculosis include malnutrition, alcoholism, presence of other infections like HIV infection that suppresses the immunity etc. Babies and the elderly are at a greater risk due to their ill-developed and declining immune system respectively.
https://www.news-medical.net/health/What-is-Tuberculosis.aspx