Tuberculosis is spread by droplet infection through coughing etc if the germ is present in the sputum, which is open TB.
Other cases are closed and not infective.
If a person suffering from open TB takes anti tubercular drugs for 14 days within a 6 to 9 months therapy which includes Rifampicin then he should become closed or non-infective. We are talking about lung TB.
Glandular TB doesn't spread in the same way.
Most indians, including you perhaps may harbor a ghons focus which is a latent TB infection in the lung hilar lymph nodes which is usually calcified and may or may not become active during one's lifetime depending on the status of immunity of the person.
BCG vaccination may offer some resistance against TB infection.
Next Steps
Ask your classmate whether he has been started on anti tubercular drugs and for how long and also whether he was sputum positive. If you have any doubts you can discuss with your school authorities/parents and also use a mask yourself and avoid being in close contact with him.
Health Tips
Remember, if your classmate is not infective you have absolutely no right to harass him.
Feel free to contact me on my mobile.