IgM appears first in response to the initial exposure.IgG follows and provides longer-term immunity. the second exposure to the same antigen stimulates the memory cells (formed at the time of initial exposure) to rapidly produce a large amount of antibody. the antibodies produced in response to this second exposure are mostly IgG.