With the booming development of modern industrial technology, rotating machinery fault diagnosis is of great significance to improve the safety, efficiency and sustainable development of industrial production. Machine learning as an effective solution for fault identification, has advantages over traditional fault diagnosis solutions in processing complex data, achieving automation and intelligence, adapting to different fault types, and continuously optimizing. It has high application value and broad development prospects in the field of fault diagnosis of rotating machinery. Therefore, this article reviews machine learning and its applications in intelligent fault diagnosis technology and covers advanced topics in emerging deep learning techniques and optimization methods. Firstly, this article briefly introduces the theories of several main machine learning methods, including Extreme Learning Machines (ELM), Support Vector Machines (SVM), Convolutional Neural Networks (CNN), Deep Belief Networks (DBN) and related emerging deep learning technologies such as Transformer, adversarial neural network (GAN) and graph neural network (GNN) in recent years. The optimization techniques for diagnosing faults in rotating machinery are subsequently investigated. Then, a brief introduction is given to the papers on the application of these machine learning methods in the field of rotating machinery fault diagnosis, and the application characteristics of various methods are summarized. Finally, this survey discusses the problems to be solved by machine learning in fault diagnosis of rotating machinery and proposes an outlook.