TB infection does not always lead to TB disease. The majority of people infected with M. tuberculosis (about 90%) never develop TB disease (provided their immunity is not compromised by HIV infection or other conditions).
TB disease develops when the immune system fails to contain the spread of M. tuberculosis and the bacilli begin to multiply rapidly. The risk that TB disease will develop is higher in individuals with a weakened immune system although what triggers reactivation is not well understood.