How did you think vaccines work?
your body contains trillions of randomly generated shapes of antibodies. a foreign agent such as a virus has antigens which your body attempts to find an appropriate antibody for. Until it finds the antibody which binds to the antigen, it uses other, more primitive, brute force methods of containing the virus... raising its internal temperature to cook the virus, and also basically carpet-bombing the site of infection (this is why you typically get a sore throat with many cold viruses: The throat is the site of infection, and your body's immune system attacks parts of throat itself as collateral damage of taking out the infection).
Once the body finds the antibody which binds to the antigen, it very quickly begins producing them in mass quantities until the virus/bacteria/foreign agent is eliminated (this is why when you get an infection/virus, you "get better" rather quickly compared to the timeframe it takes you to get worse. You'll get sick over the course of 3-4 days, and then it takes only a day for you to get better, once your body finds the appropriate antibodies to attack the virus.
That's not all, though: After an antibody is found to be useful, the body maintains higher concentrations of the antibody in the blood to protect against future infections of the same virus. It remembers what the infection looked like and how it dealt with it and modifies its defense mechanisms to more quickly respond to the same line of attack in the future.
A vaccine is typically a completely harmless mix of dead cells spliced to have the antigens (binding sites/markers) of the actual dangerous agent. Your body learns how to attack the agent structurally, and then remembers it when an actual infection occurs.
If your body takes particularly long in locating the antibody for the harmless vaccine cells, you may experience some symptoms of illness (your body will raise its temperature and attack parts of the body the vaccine was injected at), but that just means your body happened to have a difficult time figuring out what to do.
Yep, but this is a step beyond vaccines: it's directly injecting previously crafted antibodies into the bloodstream, bypassing the phase where the body has to figure out how to tackle the antigen. I'm aware the technique is old (I've heard of the "blood transfusion from survivors" technique), but I imagine there things aren't that simple otherwise it would be a lot more common.