IgM activity is mainly limited to the blood stream. IgM is therefore the first line of defense in an antibody response, attempting to keep a lid on the pathogen invasion until enough IgG antibodies can be made. Both IgM and IgG antibody continue to be produced for as long as the antigen is present. Eventually the B cell stimulation tails off as the amount of antigen present is removed from the body. Remaining unused antibody is catabolized and broken down.
Different antibodies have different abilities to survive in the body.
IgM is less robust with a half life of 10 days, IgA lasts 6 days with IgD and IgE type antibodies having a half life of 2 days before being broken down. Should the same pathogen with the same antigens attempt to re-invade the body the subsequent antibody production is faster and stronger than first time around. The B cell system has already seen this threat before and has learnt what to do. This time the IgG antibody producing cells proliferate and release IgG just as quickly as the IgM producing cells. This time around the IgM type antibodies are virtually superfluous.