Developing accurate dynamic models for various systems is crucial for optimization, control, fault diagnosis, and prognosis. Recent advancements in information technologies and computing platforms enable the acquisition of input–output data from dynamical systems, resulting in a shift from physics-based methods to data-driven techniques in science and engineering. This review examines different data-driven modeling approaches applied to the identification of mechanical and electronic systems. The approaches encompass various neural networks (NNs), like the feedforward neural network (FNN), convolutional neural network (CNN), long short-term memory (LSTM), transformer, and emerging machine learning (ML) techniques, such as the physics-informed neural network (PINN) and sparse identification of nonlinear dynamics (SINDy). The main focus is placed on applying these techniques to real-world problems. A real application is presented to demonstrate the effectiveness of different machine learning techniques, namely, FNN, CNN, LSTM, transformer, SINDy, and PINN, in data-driven modeling and the identification of a geared DC motor. The results show that the considered ML techniques (traditional and state-of-the-art methods) perform well in predicting the behavior of such a classic dynamical system. Furthermore, SINDy and PINN models stand out for their interpretability compared to the other data-driven models examined. Our findings explicitly show the satisfactory predictive performance of six different ML models while also highlighting their pros and cons, such as interpretability and computational complexity, using a real-world case study. The developed models have various applications and potential research areas are discussed.