This article gives an introduction to the realization of effective quantum magnetism with ultracold molecules in an optical lattice, reviews experimental and theoretical progress, and highlights future opportunities opened up by ongoing experiments. Ultracold molecules offer capabilities that are otherwise difficult or impossible to achieve in other effective spin systems, such as long-ranged spin-spin interactions with controllable degrees of spatial and spin anisotropy and favorable energy scales. Realizing quantum magnetism with ultracold molecules provides access to rich many-body behaviors, including many exotic phases of matter and interesting excitations and dynamics. Far-from-equilibrium dynamics plays a key role in our exposition, just as it did in recent ultracold molecule experiments realizing effective quantum magnetism. In particular, we show that dynamical probes allow the observation of correlated many-body spin physics, even in polar molecule gases that are not quantum degenerate. After describing how quantum magnetism arises in ultracold molecules and discussing recent observations of quantum magnetism with polar molecules, we survey prospects for the future, ranging from immediate goals to long-term visions.