You receive a cut.
Bacteria enter the wound.
Many are destroyed rapidly by complement and the phagocytes recruited through acute inflammation (Innate immunity).
Some of the dead bacteria or their breakdown products are taken up by the tissue resident dendritic cells.
The combined action of bacterial products and cytokines (from acute inflammation etc.) activate the tissue dendritic cells.
This causes them to migrate to the local lymph node via afferent lymphatics.
Dendritic cells enter the node in the T cell areas. They become resident there displaying their 'wares'
T cells enter the node from the blood, trafficking through the T cell area to the efferent lymph. Those which recognize the bacterial antigenic peptides displayed on the dendritic cells stop, activate, divide and differentiate; some later become memory T cells.
B cells entering nodes from the blood must cross the T rich area in transit to the B cell rich areas. The antigen-specific ones must acquire antigen too, presumably via the lymph. Then they can have their MHC-peptide complexes recognized by activated T cells and receive help.
Some become IgM secreting plasma cells. Some migrate to the B cell rich areas and form germinal centres. Here B cells proliferate and give rise to progeny with high affinity for antigen through a process called affinity maturation. The products of germinal centres become IgG, IgA etc plasma cells and memory B cells.