Simple models of interacting spins play an important role in physics. They capture the properties of many magnetic materials, but also extend to other systems, such as bosons and fermions in a lattice, systems with gauge fields, high-Tc superconductors, and systems with exotic particles such as anyons and Majorana fermions. In order to study and compare these models, a versatile platform is needed. Realizing such a system has been a long-standing goal in the field of ultracold atoms. So far, spin transport has only been studied in the isotropic Heisenberg model. Here we implement the Heisenberg XXZ model with adjustable anisotropy and use this system to study spin transport far from equilibrium after quantum quenches from imprinted spin helix patterns. In the non-interacting XX model, we find ballistic behavior of spin dynamics, while in the isotropic XXX model, we find diffusive behavior. For positive anisotropies, the dynamics ranges from anomalous super-diffusion to sub-diffusion depending on anisotropy, whereas for negative anisotropies, we observe a crossover in the time domain from ballistic to diffusive transport. This behavior contrasts with expectations for the linear response regime and raises new questions in understanding quantum many-body dynamics far away from equilibrium.