The pathogen or an invader when enters the body it gets encountered by the immune cells in the body. The lymphocytes when interacts with the antigen/pathogen or invader, it produces a immune response.
The immune response results in production of memory cells and antibody producing cells. The antibody producing cells forms antibody which kills the invader and the memory cells generates memory to prevent the body when second time encounter occurs with the same invader.
The principle is called CEPHALOCAUDAL PRINCIPLE. This principle proposed that growth follow a particular pattern in which the head and the upper part of the body grow first before the growth proceeds to other part of the body.