First of all, if you take nothing else away from this post: *if you have a reaction to the second vaccine that means it’s working*. It’s ok if you don’t have a reaction to the second shot. Your vaccine is still working. But if you do have a reaction, that is good. There’s a longer explanation below, but if someone says “the vaccine made me sick” - good!
Longer science stuff here.
First, how our bodies work. When particles from a virus or a bacteria are found in our bloodstream, our body’s very first reaction is to get hot. Most microorganisms have a narrow temperature range they can survive* at. By getting hot, we can kill the pathogen. That’s why you get fevers. This is called nonspecific immunity because it’s a generic response to pretty much everything.
We also have specific immunity. These are cells whose entire job is to look out for one microorganism and kill it when they find it, before it can make you sick. For your specific immunity to develop, your body needs to encounter the microorganism first - usually, by getting sick. This is where vaccines come in.
How vaccines work: a vaccine is a way to develop your specific immunity without you getting sick first. Usually, we expose you to a large enough dose of the virus** - made weaker or killed, as Darkwingatlarge said - that your body is able to recognize that virus. Because the virus is weakened or killed, you don’t get sick, but as far as your body knows, it’s the same as if you got sick. Next time you encounter the virus, your body is able to kill it before it can make you sick. However, the COVID vaccine is a little different, and to understand how it works, it helps to understand how viruses work.
How viruses work: viruses have essentially one goal, which is to turn your cells into little factories that make more virus. Every cell in your body is constantly making proteins, all the time. Viruses co-opt this process so the cell makes copies of the virus instead. That virus goes out to infect new cells.
So, all of this leads to the big one: how the COVID vaccine works.
The COVID vaccine uses the same trick viruses use. Instead of using a killed or weakened virus to teach your body “this = bad”, the COVID vaccine uses mRNA - the same mRNA out cells use to say “build this protein” all the time. But the mRNA directs your cells to make one tiny part of the COVID virus instead. Not the dangerous part; a single spike protein that the COVID virus uses to attach to your cells.
Your body has a natural check in-process. When a cell makes a protein, it presents it to the regulatory cells and says “look what I made!” If the cell is making the right protein, nothing happens. But if the cell is making the wrong protein, either because it was a damaged, or because it’s been *infected by a virus* - this alerts the immune system and activates your specific and nonspecific immunity.
So what happens when you get vaccinated? Some of your cells start making a tiny, harmless spike protein and says “I made this! Is it good?” Other cells show up and say “absolutely not, that’s garbage, never make it again.” Your body learns that if it ever encounters this spike protein again, to kill it on sight. This is great if you get Covid, because it activates specific immunity. But, on dose two, when your body is still learning, what happens? Your body knows enough to say “no, this is bad,” but not enough to summon the specific immunity against COVID. Instead, it activates your nonspecific immunity — fever, and all the aches and pains that come with it.
You have a negative reaction to the second COVID vaccine dose, because your body starts making spike protein. Your body says “I know I hate this, but I don’t know what to do yet, so, uh, go off I guess” and does what it always does — it gets hot.
*technically, most microorganisms have a limited temperature at which they can reproduce. But, when your life span is hours, not being able to reproduce is a Big Problem.
**there are bacterial vaccines as well but they’re rarer and operate on more or less the same principle, so we’re using virus here.