The main TB bacterium is Mycobacterium tuberculosis (M. tuberculosis). Many people infected with this bacterium never have active TB. They remain in the inactive (latent) TB stage. But some will develop active TB anytime from months to years, or even decades, after being exposed. The highest risk of active TB is in the first two years after infection. The chance of developing active TB is highest in babies and children and in older adults. It also is more likely in people with a weak immune system. This includes people with HIV, an organ or stem cell transplant, or who are taking immune suppressing medicines.
The TB bacterium is spread through the air most often when a person with an active lung infection coughs, sneezes, speaks, sings, or laughs. It's very unlikely to be spread from personal items that a person with TB has touched. Good ventilation can limit the spread of TB to other people. But early diagnosis and treatment of the person with active TB is most important. It's also important to limit other people's exposure. This means using masks and respiratory isolation.