In homeostasis, cellular processes are in a dynamic equilibrium. Perturbation of homeostasis causes stress. In this review I summarize how perturbation of three major functions of the endoplasmic reticulum (ER) in eukaryotic cells -- protein folding, lipid and sterol biosynthesis, and storing intracellular Ca(2+) -- causes ER stress and activates signaling pathways collectively termed the unfolded protein response (UPR). I discuss how the UPR reestablishes homeostasis, and summarize our current understanding of how the transition from protective to apoptotic UPR signaling is controlled, and how the UPR induces inflammatory signaling.