Autonomous unmanned aerial vehicles (UAVs) have several advantages in various fields, including disaster relief, aerial photography and videography, mapping and surveying, farming, as well as defense and public usage. However, there is a growing probability that UAVs could be misused to breach vital locations such as airports and power plants without authorization, endangering public safety. Because of this, it is critical to accurately and swiftly identify different types of UAVs to prevent their misuse and prevent security issues arising from unauthorized access. In recent years, machine learning (ML) algorithms have shown promise in automatically addressing the aforementioned concerns and providing accurate detection and classification of UAVs across a broad range. This technology is considered highly promising for UAV systems. In this survey, we describe the recent use of various UAV detection and classification technologies based on ML and deep learning (DL) algorithms. Four types of UAV detection and classification technologies based on ML are considered in this survey: radio frequency-based UAV detection, visual data (images/video)-based UAV detection, acoustic/sound-based UAV detection, and radar-based UAV detection. Additionally, this survey report explores hybrid sensor- and reinforcement learning-based UAV detection and classification using ML. Furthermore, we consider method challenges, solutions, and possible future research directions for ML-based UAV detection. Moreover, the dataset information of UAV detection and classification technologies is extensively explored. This investigation holds potential as a study for current UAV detection and classification research, particularly for ML- and DL-based UAV detection approaches.