The process by which cell types or cell populations attain distinct and different forms and functions is called differentiation.
This is the process that allows the stem cells to differentiate and form a cell type that will perform a specific function.
The process of differentiation is essential for the formation of the different organs in multicellular organisms.