We propose a model of magnetic friction and investigate the relation between the frictional force and the relative velocity of surfaces in the steady state. The model comprises two square lattices adjacent to each other, the upper of which is subjected to an external force, and the magnetic interaction acts as a kind of "potential barrier" that prevents the upper lattice from moving. We consider two surface types for the upper lattice: smooth and rough. The behavior of this model is classified into three domains, which we refer to as domains I,II, and III. In domain I, the external force is weak and cannot move the lattice, whereas in domain III, the external force is dominant compared with other forces. In the intermediate domain II, the frictional force obeys the Dieterich-Ruina law. This characteristic property can be observed regardless of whether the surface is smooth or rough.