TB is caused by TB bacteria. The risk of getting sick with TB among those with TB infection depends on age. Small children are most vulnerable. After them, young and young adults have the greatest risk. They are active and move a lot in society, so infection also spreads among them more easily.
If you or your friend have symptoms of TB disease, go and get yourself checked and encourage your friend to do so as well.