Cyber-Physical Systems are one of the emerging technologies which involve the integration of cyber system physical and control systems. This Cyber-physical System automates the industrial process like manufacturing, monitoring and control. Since the system involves three different cyber, physical and control optimization domains, such systems are complex in nature and cannot be done with a traditional optimization mechanism. Machine learning and deep learning are efficient mechanisms to model the behavior of such complex systems for design and optimization. In this work, the application of machine learning mechanisms in the cyber-physical system for various purposes like security, re-organization, and scheduling. This systematic review will give more insight into the latest application and mechanism of machine learning and deep learning for the cyber-physical system.