You can get infected by being around a person with active tuberculosis. When an infected person coughs, talks, sneezes, or sings, bacteria get into the air. This bacteria can enter your body when you breathe and infect your lungs.