During wound healing, contractile fibroblasts called myofibroblasts regulate the formation and contraction of granulation tissue; however, pathological and persistent myofibroblast activation, which occurs in hypertrophic scars or tissue fibrosis, results in a loss of function. Many reviews outline the cellular and molecular features of myofibroblasts and their roles in a variety of diseases. This review focuses on the origins of myofibroblasts and the factors that control their differentiation and prolonged survival in fibrotic tissues. Pulmonary fibrosis is used to illustrate many key points, but examples from other tissues and models are also included. Myofibroblasts originate mostly from tissue-resident fibroblasts, and also from epithelial and endothelial cells or other mesenchymal precursors. Their differentiation is influenced by cytokines, growth factors, extracellular matrix composition and stiffness, and cell surface molecules such as proteoglycans and THY1, among other factors. Many of these effects are modulated by cell contraction. Myofibroblasts resist programmed cell death, which promotes their accumulation in fibrotic tissues. The cause of resistance to apoptosis in myofibroblasts is under ongoing investigation, but many of the same stimuli that regulate their differentiation are involved. The contributions of oxidative stress, the WNT-β-catenin pathway and PPARγ to myofibroblast differentiation and survival are increasingly appreciated.