TB is caused by the bacterium Mycobacterium tuberculosis. It spreads through the air when an infected person coughs, sneezes, or talks. People with weakened immune systems, such as those with HIV or diabetes, are more susceptible to TB. It can also spread more easily in crowded living conditions and in areas with poor ventilation.