Cloud computing (CC) is on-demand accessibility of network resources, especially datastorage and processing power, without special and direct management by the users. CC recentlyhas emerged as a set of public and private datacenters that offers the client a single platform acrossthe Internet. Edge computing is an evolving computing paradigm that brings computation andinformation storage nearer to the end-users to improve response times and spare transmissioncapacity. Mobile CC (MCC) uses distributed computing to convey applications to cell phones.However, CC and edge computing have security challenges, including vulnerability for clients andassociation acknowledgment, that delay the rapid adoption of computing models. Machine learning(ML) is the investigation of computer algorithms that improve naturally through experience. In thisreview paper, we present an analysis of CC security threats, issues, and solutions that utilizedone or several ML algorithms. We review different ML algorithms that are used to overcomethe cloud security issues including supervised, unsupervised, semi-supervised, and reinforcementlearning. Then, we compare the performance of each technique based on their features, advantages,and disadvantages. Moreover, we enlist future research directions to secure CC models.