T cells are a part of the immune system that focuses on specific foreign particles. Rather than generically attack any antigens, T cells circulate until they encounter their specific antigen. As such, T cells play a critical part in immunity to foreign substances.
B cells create a type of protein called an antibody. These antibodies bind to pathogens or to foreign substances, such as toxins, to neutralize them. For example, an antibody can bind to a virus, which prevents it from entering a normal cell and causing infection.