here's a small crash course in how the immune system responds to things. it's a lot more complicated than this on the cellular level, but this is basically all you need to understand to get how vaccines work.
firstly,
antigens are substances that provoke an immune response. this could be a virus, bacteria, splinter, or something else. there's a wide variety of receptors for different kinds of antigens.
the body has two different systems of immunity; innate immunity (also called non-specific immunity), and adaptive immunity (also called specific immunity).
innate immunity is made up of two lines of defense. the
first line of defense is the membranes that are exposed to the environment (for example your skin, or mucous membranes of the gut). this line of defense simply prevents antigens from entering the bloodstream as a physical barrier. the
second line of defense of the innate immunity is a bit more complicated. but it basically boils down to the body's automated responses against anything it doesn't recognize. this includes the use of substances that discourage microbial growth, certain white blood cells that attack foreign cells or particles, inflammatory response, and fever.
adaptive immunity is the ability of the body to defend itself against specific invading antigens. the key thing about adaptive immunity is that
it has the ability to learn, so that it can respond faster to destroy antigens it recognizes from previous attacks. basically, when something enters the body that it doesn't recognize, the adaptive immune system develops antibody cells that are designed to respond to that antigen specifically. it pumps out a shit ton of these, and stores what could be considered a 'blueprint' of the antigen. if the antigen enters the body a second time later on, it will be compared against this blueprint, and if it's a match, the body will be able to respond much much faster.
this is the basis of immunizations. if you show your body what a specific, dangerous antigen looks like in an inactive state, it will memorize it and be prepared to obliterate it quickly if the real thing should attack one day.
now, you've asked why you can't just pump in the cure? if the body can produce an antibody, why not just harvest/simulate that and inject that into everyone? it's not that simple. every cell in the body has proteins sticking out of it that act as
identity markers. i mentioned above that in the second line of defense of innate immunity, there are white blood cells which attack any foreign cells. these are called "natural killer cells", and they work by checking if other cells are displaying the exact correct identity markers, (which are different for every person and specific to your DNA). if the markers on a cell don't look right, NK cells attack and destroy. so if you wanted to give someone an antibody to cure some illness, you would need to manufacture (or modify) it to have identity markers which are identical to those that naturally occur within the person you want to cure. this is extremely impractical, and probably very expensive (if it's even possible). additionally, you would need to provide antibodies for every person every time they get sick, as well as be able to identify exactly what antigen you're dealing with in all of those people. again, impractical, expensive, and maybe not even possible.
it's much more efficient to give people the means to produce their own antibodies, and let their body naturally identify that shit for them. so, that's why.
also, i'll just leave this here
http://www.sciencedirect.com/science/article/pii/S0264410X14006367