We study the dynamics and stability of legged locomotion in the horizontal plane. Motivated by experimental studies of insects, we develop two- and three-degree-of freedom rigid body models with pairs of 'virtual' elastic legs in intermittent contact with the ground. We focus on conservative compliant-legged models, but we also consider prescribed forces, prescribed leg displacements, and combined strategies. The resulting mechanical systems exhibit periodic gaits whose stability characteristics are due to intermittent foot contact, and are largely determined by geometrical criteria. Most strikingly, we show that mechanics alone can confer asymptotic stability in heading and body orientation. In a companion paper, we apply our results to rapidly running cockroaches.