B and T cells are the two main types of lymphocyte. (There is also a third type, referred to as "NK Cells"). Lymphocytes are a subset of leukocyte, or white blood cell, which mature in the lymphatic system of the body. "B" and "T" refers to the structures where the lympocytes mature; T is for "thymus". The B is a little weirder - they were originally identified in birds, where B cells mature in a structure called the "Bursa of fabricus". You'll find some people claiming that the "B" stands for "bone" - and indeed, B-cells are formed in the bone marrow, but so are T-cells, and all leukocytes (and indeed, pretty much all blood cells).
Both types of lymphocyte posses the ability to recognise specific "foreign" material, which is what definitively distinguishes them from other types of white blood cells, which usually have a fairly indiscriminate response to infection (macrophages chomp things up, granulocytes through chemicals at them). Generally speaking, lymphocytes mediate acquired immunity, while the other leukocytes mediate innate immunity. but that's a massive simplification. In practise, there's a lot of crosstalk between the two, with lymphocytes playing an important role in directing macrophages and granulocytes to the right targets, and macrophages in particular being important in alerting lymphocytes to the presence of potentially foreign material.
Both B cells and T cells produce specialised "receptors" which are, through a fascinating process of controlled mutation are capable of generating astronomical amounts of variation in the targets they recognise, which allows them to specifically target pretty much any biological molecule that is "non self". The two cell types have very different types of receptors - imaginatively titled the "B cell receptor" and the "T cell receptor" - which are tuned to their specific functions. The B cell receptor, when it is made in a detatchable form by an activated B cell and released in large quantities, has a name you may be more familiar with - they're called antibodies, and have important roles in marking or tagging infectious organisms for destruction or excretion.
The function of T cells and T cell receptors is a bit more subtle. These also recognise "non self" molecules, but only when it's presented to them in an appropriate form. So while B cells "listen" to everything, and can detect any random molecule that drifts by, T cells can only "listen" to specific cells in the body (called "antigen presenting cells"). They're sort of like the managers of the immune system, monitoring the activity of leukocytes like macrophages to make sure that only infectious organisms are being attacked, and tamping down or boosting responses depending on the situation. These are referred to as "helper" T cells.
There is however a second type of T cell, called a "cytotoxic" T cell. These guys still only "listen" to the bodies own cells, but rather than monitoring leukocytes to make sure they're doing a good job, they go around the whole body looking at normal cells to make sure everythings okay. If a cell has a viral infection, or is turning into cancer, these T cells are vital in spotting the early changes that happen, and can tell the host cell to shut down (literally commit suicide in some cases) to prevent damage to the rest of the body.