During manipulation and locomotion tasks encountered in robotics, it is often necessary to control the relative motion between two contacting rigid bodies. In this paper we obtain the equations relating the motion of the contact points on the pair of contacting bodies to the rigid body motions of the two bodies. The equations are developed up to the second order. The velocity and acceleration constraints for contact, for rolling, and for pure rolling are derived. These equations depend on the local surface properties of each contacting body. Several examples are presented to illustrate the nature of the equations.