Machine Learning (ML) and Deep Learning (DL) have been widely used in our daily lives in a variety of ways with many effective stories. Also, they have been instrumental in tackling the Coronavirus (COVID-19) epidemic, which has been occurring around the world. The COVID-19 epidemic caused by the SARS-CoV-2 virus has spread rapidly around the world, leading to global outbreaks. Most governments, businesses, and scientific research institutions are taking part in the COVID-19 struggle to stem the spread of the disease. In this survey, we investigate the Artificial Intelligence (AI) based ML and DL towards COVID-19 diagnosis and treatment. In addition, we summarize the AI-based ML and DL methods and available datasets, resources, and results in the fight against COVID-19. This survey provides the ML and DL researchers and the wider health community a comprehensive overview of the current state-of-the-art methodologies and applications with details of how ML and DL and data can improve the status of COVID-19, and further studies to stop the COVID-19 outbreak. Challenges and future directions details are also provided.