Anything that causes an immune response is called an antigen. An antigen may be harmless, such as grass pollen, or harmful, such as the flu virus. Disease-causing antigens are called pathogens. The immune system is designed to protect the body from pathogens.
In humans, the immune system begins to develop in the embryo. The immune system starts with hematopoietic (from Greek, "blood-making") stem cells. These stem cells differentiate into the major players in the immune system (granulocytes, monocytes, and lymphocytes). These stems cells also differentiate into cells in the blood that are not involved in immune function, such as erythrocytes (red blood cells) and megakaryocytes (for blood clotting). Stem cells continue to be produced and differentiate throughout your lifetime.
Hematopoietic stem cells produce cells in blood and lymph
Adapted from Biology of the Immune System, JAMA 278 (22)
By the time a baby is born, the immune system is a sophisticated collection of tissues that includes the blood, lymphatic system, thymus, spleen, skin, and mucosa.