the main cells that make it work are the b cells, which create and secrete antibodies that seek out the invaders and attach to them. once the invader is coated in antibodies, this targets the invader for destruction by other parts of the immune system. before the b cell can create antibodies, it first needs t helper cells to 'teach' the b cell about details of the incoming invader. this is a key part of the adaptive immune system, and the reference attached here summarizes the process.