
Holly S. answered 10/14/21
Immunology (Cell Bio/Biochemistry) PhD / Comp Bio Postdoc
Developmental bio and Immunology are probably the best examples of this- I'm an immunologist so I'm going to use that as an example but the concepts are broadly applicable.
T cells, for example, start out as 'naive' since they've never encountered an infection. Each one is specific for a different antigen (completely randomly) and when a T cell encounters the antigen (components of pathogens, generally proteins) its specific for, it becomes 'activated'. This tells the cell that it needs to enter cell cycle, proliferate, and engage cellular differentiation processes to fight infection. For example a CD8+ T cell will become a Killer T cell, and will start to express genes that allow it to kill infected cells and limit infection. This involves changes in gene expression, but also things like epigenetic remodeling of the cell, so it can never be truly 'naive' again.
As the infection begins to resolve, the cell knows that it's uniquely capable of recognizing antigens that are associated with a pathogen the host may experience again, so instead of going back to the 'naive' state the cell becomes a memory T cell. These are qualitatively different from naive cells, have a different epigenetic structure, and engage activating signals more rapidly so that next time the cell encounters that antigen it can respond faster and better. This is the principle behind immune memory, and applies to lots of immune cell types (canonically T and B cells).
Similar processes happen to stem cells during development or homeostatically when the asymmetrically divide and their progeny differentiate into different cell types to repopulate various tissues. "Commitment" to a cell fate often involves permanent epigenetic reprogramming, and essentially explains the diversity of cell types in multicellular organisms.