This dissertation presents several machine learning frameworks that can solve challenging forward and inverse problems of physical spatiotemporal systems. To achieve this, modern deep learning models for complex systems were developed by integrating machine learning, numerical methods, and probabilistic modeling. In particular, the thesis focuses on physics-informed machine learning, data-driven modeling, which involve convolutional neural network (CNN), graph neural network (GNN), transformer, and deep probabilistic model. Taken together, the frameworks presented in this thesis offer useful insight into the impact of modern deep learning models on solving challenging spatiotemporal systems in physics.