A mathematical model of the hysteresis mechanisms in ferromagnets is presented. This is based on existing ideas of domain wall motion including both bending and translation. The anhysteretic magnetization curve is derived using a mean field approach in which the magnetization of any domain is coupled to the magnetic field H and the bulk magnetization M. The anhysteretic emerges as the magnetization which would be achieved in the absence of domain wall pinning. Hysteresis is then included by considering the effects of pinning of magnetic domain walls on defect sites. This gives rise to a frictional force opposing the movement of domain walls. The impedance to motion is expressed via a single parameter k, leading to a simple model equation of state. This exhibits all of the main features of hysteresis such as the initial magnetization curve, saturation of magnetization, coercivity, remanence, and hysteresis loss.