T cells are crucial for immune functions to maintain health and prevent disease. T cell development occurs in a stepwise process in the thymus and mainly generates CD4+and CD8+T cell subsets. Upon antigen stimulation, naïve T cells differentiate into CD4+helper and CD8+cytotoxic effector and memory cells, mediating direct killing, diverse immune regulatory function, and long-term protection. In response to acute and chronic infections and tumors, T cells adopt distinct differentiation trajectories and develop into a range of heterogeneous populations with various phenotype, differentiation potential, and functionality under precise and elaborate regulations of transcriptional and epigenetic programs. Abnormal T-cell immunity can initiate and promote the pathogenesis of autoimmune diseases. In this review, we summarize the current understanding of T cell development, CD4+and CD8+T cell classification, and differentiation in physiological settings. We further elaborate the heterogeneity, differentiation, functionality, and regulation network of CD4+and CD8+T cells in infectious disease, chronic infection and tumor, and autoimmune disease, highlighting the exhausted CD8+T cell differentiation trajectory, CD4+T cell helper function, T cell contributions to immunotherapy and autoimmune pathogenesis. We also discuss the development and function of γδ T cells in tissue surveillance, infection, and tumor immunity. Finally, we summarized current T-cell-based immunotherapies in both cancer and autoimmune diseases, with an emphasis on their clinical applications. A better understanding of T cell immunity provides insight into developing novel prophylactic and therapeutic strategies in human diseases.