The dynamics of motor protein molecules consisting of two subunits is investigated using simple discrete stochastic models. Exact steady-state analytical expressions are obtained for velocities and dispersions for any number of intermediate states and conformations between the corresponding binding states of proteins. These models enable us to provide a detailed description and comparison of two different mechanisms of the motion of motor proteins along the linear tracks: the hand-over-hand mechanism, when the motion of subunits alternate; and the inchworm mechanism, when one subunit is always trailing another one. It is shown that the proteins in the hand-over-hand mechanism move faster and fluctuate more than the molecules in the inchworm mechanism. The effect of external forces on dynamic properties of motor proteins is also discussed. Finally, a quantitative method, based on experimental observations for single motor proteins, is proposed for distinguishing between two mechanisms of motion.