This is not meant as an in-depth discussion of immunology, just as an introduction so that you have a basic understanding of the terminology you need in order to discuss this with your veterinarian.
We have many kinds of non-specific, passive mechanisms that help to protect us from the world around us that are all part of the immune system. They do not really distinguish between specific kinds of invaders. Examples of passive immunity are enzymes in tears and saliva that break down bacteria, acid in the stomach that will kill just about anything, and the thick, waterproof barrier of normal skin.
These non-specific systems are the first line of defense, but are not as potent in some ways as the more active immune system. They do not become better or faster with repeated exposure. Your tears do not contain more enzymes the more often you get sand in your eye.
Active or acquired immunity
This is the type of immunity that we are talking about when we look at the response to vaccines. A normal, healthy body is able to distinguish between what belongs in it and what does not. You have, on most of your body cells, a molecule that identifies those cells as being unique to you. It's a bit like a password; you are accepted and allowed to stay in the area if you have the right password.
Things that come into your body, like bacteria or viruses, do not have the correct password. For simplicity, let's use a virus as an example of something that might get into your bloodstream. The cells of your immune system look for the correct password, and if they don't see it, things start to gear up to repel the invasion.
Active immunity takes two forms, Humoral and Cell-mediated.
Humoral immunity (antibody production)
After recognition of a "foreign" object like a virus, one particular type of white blood cell called a B-lymphocyte begins to make antibodies. An antibody is just a protein molecule, but it is very special. The lymphocytes release large numbers of antibodies which then circulate in the blood and glue onto the virus when they encounter it. The mechanism is like a lock and key; that antibody molecule is made for a specific protein (called an antigen) on that specific virus, and will not attach to any others. Antibodies against distemper virus won't stick to a parvo virus.
Soon the virus becomes coated with antibodies. Other immune cells come along and devour the coated virus and digest it.
It takes time for this to happen, however; usually 7-10 days. On the first exposure to a new antigen the immune system is usually too slow in responding to protect your pet from being infected. This is why, despite the fact that our immune systems are healthy, we can still get colds and other infectious diseases, and your puppy can still get parvo.
Some of the cells that are involved in this very first response turn into memory cells. Upon a second or third exposure to the same organism, these memory cells reproduce very quickly and their offspring can start churning out antibodies very soon, inactivating the virus before it can establish an infection.
Immunity to disease is therefore a matter of teaching the immune system and establishing memory about what it has seen and repelled before. Once firmly established, immunity against a particular antigen can last a very long time. Memory cells may last for the lifetime of the animal.
This kind of immunity is a result of the interaction of several different kinds of white blood cells. It is controlled by a class of cells called T cells. Some pathogens, particularly viruses, go undercover and try to hide from the immune system by inserting themselves into various body cells. Inside the cell, the virus sometimes goes dormant or latent, or it can force the body cell to make more virus.
These invaded cells are not silent; they "call for help" by producing a bunch of new proteins on their surface that alert the T cells to the presence of virus inside. Once aware of the threat, these T cells kill the host cell or secrete protein "missiles" that eliminate targeted host cells.
So what does this have to do with vaccination?
Cell-mediated immunity helps the animal not to get sick, while the memory properties of humoral immunity (antibody production) help the pet from becoming sick on re-exposure. So, the ideal vaccine would be one that could elicit both types of immune response.