The coronavirus disease 2019 (COVID-19) pandemic, caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2), is associated with a robust immune response. The development of systemic inflammation leads to a hyperinflammatory state due to cytokine release syndrome during severe COVID-19. The emergence of many new SARS-CoV-2 variants across the world deteriorates the protective antiviral immunity induced after infection or vaccination. The innate immune response to SARS-CoV-2 is crucial for determining the fate of COVID-19 symptomatology. T cell-mediated immunity is the main factor of the antiviral immune response; moreover, SARS-CoV-2 infection initiates a rapid B-cell response. In this paper, we present the current state of knowledge on immunity after COVID-19 infection and vaccination. We discuss the mechanisms of immune response to various types of vaccines (nucleoside-modified, adenovirus-vectored, inactivated virus vaccines and recombinant protein adjuvanted formulations). This includes specific aspects of vaccination in selected patient populations with altered immune activity (the elderly, children, pregnant women, solid organ transplant recipients, patients with systemic rheumatic diseases or malignancies). We also present diagnostic and research tools available to study the anti-SARS-CoV-2 cellular and humoral immune responses.