I’m not a doctor or a biologist, but here’s my understanding.
A virus is a replicating strand of RNA or DNA in a protien case. It infects cells by binding to them. Then the DNA or RNA leaves the protien case and enters the cell itself, “reprogramming” the cell to produce copies of the virus, instead of other copies of the cell. One of the ways the body responds to this is by producing antibodies, which are chemicals designed to destroy the outer protein shell. Each kind of antibody reacts to a specific kind of protein. So, if you get the flu, your body produces the antibodies that act against the protein shell around that particular flu virus. If you then get infected by the measles virus, the flu antibodies your body made won’t react to the protein surrounding the measles virus, and your body will have to make a new set of antibodies to respond to that.
A “live vaccine” is a vaccine made up of weakened copies of the virus you’re vaccinating against. So, to give you a vaccination against measles, I actually inject you with the measles virus. But, it’s a weakened copy of the measles virus, and it can’t reproduce very quickly, which makes it easy for your body to defeat. You won’t get sick because your body will be able to produce antibodies before it can effectively take over cells.
A dead vaccine is just made up of viral protein casings. There’s no DNA or RNA in them (or the DNA or RNA has been tampered with so that it doesn’t work) Your body still sees that there are foreign proteins in your bloodstream, though, so it produces antibodies against them. So, in the future, if you’re exposed to the actual virus, you’ll already have the antibodies against it, and it won’t infect you.