The COVID-19 pandemic is a novel, fast-spreading, deadly virus. It has spread around the world in an extremely short time. Due to its rapid spread and negative effects on all aspects of our lives (health, finances, stress, etc.), scientists are seeking to find accurate and fast solutions to this crisis. In our paper, we present a systematic literature review (SLR) of the different machine learning (ML) and deep learning (DL) techniques used for the detection, classification, and segmentation of COVID-19. We depend on our review of reliable databases such as IEEE Explore, Google Scholar, MDPI, Springer, PubMed, and Science Direct. By surveying approximately 978 papers, we found that 160 were more authorized, 77 of which were selected for review and met the criteria. A taxonomy is introduced to describe the sequence of our paper. Subsequently, a deep analysis and critical review of the academic literature were conducted to highlight the challenges and significant gaps identified in the introduced subject. The results revealed a shortage of research that assessed and established standards for the methods utilized for identifying and categorizing COVID-19 chest imaging techniques. As we continue the assessment and standardization process, three main difficulties are anticipated: the existence of various evaluation criteria for each task, the conflicts between these criteria, and the importance of these criteria. Moreover, we present a review of different systems used from the beginning of this crisis based on ML and DL by using different medical image modalities, such as chest X-ray, chest computed tomography (CT), magnetic resonance imaging (MRI), and ultrasound imaging. We also highlight the datasets used and the different results of performance measures that have been developed by different researchers in this medical field. Finally, we discuss the limitations and lessons learned that are associated with the use of ML and DL techniques for diagnosing COVID-19. To support our work, we developed a new algorithm based on using transfer learning for several deep learning models and applied it to our own dataset. The aim of our paper is to collect various authorized data to help experts and specialists understand the importance of ML and DL systems in this respect, represent a new algorithm, and benefit them in future work toward fighting COVID-19.