This paper introduces MagNet, an equivariant neural network framework for modeling magnetic materials. The framework efficiently represents density functional theory (DFT) total energy, atomic forces, and magnetic forces as functions of atomic and magnetic structures. By incorporating the principle of equivariance under the three-dimensional Euclidean group, MagNet achieves high accuracy and generalization in predicting magnetic properties. The method is tested on various systems, including monolayer magnets, curved nanotube magnets, and moiré-twisted bilayer magnets of CrI₃, demonstrating its effectiveness in capturing magnetic phenomena. MagNet's design integrates both atomic and magnetic degrees of freedom, enabling efficient and accurate learning of magnetic materials. The framework is applied to study spin dynamics of moiré-twisted bilayer CrI₃, showing promising applications in magnetic materials computation at large length/time scales. The method leverages symmetry principles to reduce training complexity and data requirements, and is validated through extensive simulations and comparisons with DFT results. MagNet's ability to predict magnetic forces and magnon dispersion highlights its potential for exploring novel magnetism and spin dynamics in magnetic structures. The study demonstrates that deep learning methods can accurately predict magnetic and electronic structures of magnetic superstructures.This paper introduces MagNet, an equivariant neural network framework for modeling magnetic materials. The framework efficiently represents density functional theory (DFT) total energy, atomic forces, and magnetic forces as functions of atomic and magnetic structures. By incorporating the principle of equivariance under the three-dimensional Euclidean group, MagNet achieves high accuracy and generalization in predicting magnetic properties. The method is tested on various systems, including monolayer magnets, curved nanotube magnets, and moiré-twisted bilayer magnets of CrI₃, demonstrating its effectiveness in capturing magnetic phenomena. MagNet's design integrates both atomic and magnetic degrees of freedom, enabling efficient and accurate learning of magnetic materials. The framework is applied to study spin dynamics of moiré-twisted bilayer CrI₃, showing promising applications in magnetic materials computation at large length/time scales. The method leverages symmetry principles to reduce training complexity and data requirements, and is validated through extensive simulations and comparisons with DFT results. MagNet's ability to predict magnetic forces and magnon dispersion highlights its potential for exploring novel magnetism and spin dynamics in magnetic structures. The study demonstrates that deep learning methods can accurately predict magnetic and electronic structures of magnetic superstructures.