Coronavirus disease 2019 (COVID-19) has significantly impacted the entire world today and stalled off regular human activities in such an unprecedented way that it will have an unforgettable footprint on the history of mankind. Different countries have adopted numerous measures to build resilience against this life-threatening disease. However, the highly contagious nature of this pandemic has challenged the traditional healthcare and treatment practices. Thus, artificial intelligence (AI) and machine learning (ML) open up new mechanisms for effective healthcare during this pandemic. AI and ML can be useful for medicine development, designing efficient diagnosis strategies and producing predictions of the disease spread. These applications are highly dependent on real-time monitoring of the patients and effective coordination of the information, where the Internet of Things (IoT) plays a key role. IoT can also help with applications such as automated drug delivery, responding to patient queries, and tracking the causes of disease spread. This paper represents a comprehensive analysis of the potential AI, ML, and IoT technologies for defending against the COVID-19 pandemic. The existing and potential applications of AI, ML, and IoT, along with a detailed analysis of the enabling tools and techniques are outlined. A critical discussion on the risks and limitations of the aforementioned technologies are also included.