Snakes have no legs, yet they can move very fast. If you watch a snake slithering, you will see that it usually moves in a zigzag manner. It does this by alternately tightening and relaxing a set of muscles along each side of its body. This produces horizontal waves, which let it move forward in a zig zag manner.
Some Snakes that live in deserts are known as sidewinders. They 'throw' portions of their bodies to the next 'step', so that the body has minimal contact with hot surfaces. Other snakes move like caterpillars. They contract their bodies into curves, but these waves are much smaller, and curve up and down. Snakes climb using the concertina technique. The snake extends its head and the front of its body along the vertical surface, and then finds a place to grip with its scales.To get a good hold, it bunches up the middle of its body into tight curves that grip the surface, while it pulls its back end up. It then springs forward again, to find a new place to grip with its scales.