CD8 T cells play a vital role in the immunological protection against intracellular pathogens. Ideally, robust effector responses are induced, which eradicate the pathogen, and durable memory CD8 T cells are also established, which help confer protection against subsequent reinfection. The quality and magnitude of these responses is dictated by multiple factors, including their initial interactions with professional antigen-presenting cells, as well as the cytokine milieu and availability of CD4 T cell help. These factors set the transcriptional landscape of the responding T cells, which in turn influences their phenotypic and functional attributes as well as ultimate fate. Under certain conditions, such as during chronic infections, the development of these usually successful responses becomes subverted. Here we discuss advances in our understanding of the cellular and molecular determinants of T cell quality, and the formation of effector, memory, and exhausted CD8 T cells, during acute and chronic infections.