The T cell repertoire is generated during thymic development in preparation for the response to antigens from pathogens. The T cell repertoire is shaped by positive selection, which requires recognition by the T cell antigen receptor (TCR) of complexes of self peptide and major histocompatibility complex proteins (self-pMHC) with low affinity, and negative selection, which eliminates T cells with TCRs that recognize self-pMHC with high affinity. This generates a repertoire with low affinity for self-pMHC but high affinity for foreign antigens. The TCR must successfully engage both of these ligands for development, homeostasis and immune responses. This review discusses mechanisms underlying the interaction of the TCR with peptide-major histocompatibility complex ligands of varying affinity and highlights signaling mechanisms that enable the TCR to generate different responses to very distinct ligands.