The exploration of intelligent machines has recently spurred the development of physical neural networks, a class of intelligent metamaterials capable of learning, whether in silico or in situ, from observed data. In this letter, we introduce 'equilibrium learning', a novel physical learning rule designed for lattice-based mechanical neural networks (MNNs) to achieve target performance. This approach leverages the steady states of nodes for back-propagation, efficiently updating the learning degrees of freedom. One-dimensional MNNs, trained with equilibrium learning in silico, can exhibit the desired behaviors on demand function as intelligent mechanical machines. The approach is then employed for the precise morphing control of two-dimensional MNNs subjected to shear or uniaxial loads. Moreover, the MNN is trained to execute classical machine learning tasks such as regression, and preprogrammed bandgap control, establishing it as a versatile platform for physical learning. Our approach presents an efficient pathway for the design of lattice-based mechanical metamaterials for a wide range of static and dynamic target functionalities, positioning them as powerful engines for physical learning.