Bone marrow is soft tissue located within the hollow interior portion of bones. There are actually two types of marrow: red marrow produces red blood cells, platelets, and most of the white blood cells, while yellow marrow produces a few white blood cell types.
Immune cells differentiate from stem cells in a step-wise fashion. The process begins with hematopoetic stem cells, and from there a single cell differentiates into a range of cell types, including myeloid cells and lymphoid cells. Each of these can further differentiate into more specific cell types – myeloid cells into phagocytes and granulocytes, and lymphoid cells into B cells, T cells, and natural kill cells, among others.
Once they have fully differentiated, lymphocytes exit the blood marrow and travel to other immune organs: T cells to the thymus, and B cells to the spleen. Here, they will undergo further maturation processes. Most other immune cell types leave the bone marrow as fully functional mature cells.