The motion is a back and forwards motion. As tiny said (I think - just skinner her post - sorry tiny!), an up and down motion will leave you behind the movement and you will clunk down on the horse's back at every stride.
For what should move, well the main moving point will be your pelvis. Your upper body shoulder remain dead still, your arms and hands should remain dead still relative to the horse. The pelvis is simply 'bumped' out of the saddle by the horse's movement, which means you should just be coming out of the saddle by a couple of centimetres max, by allowing the pelvis to be pushed lightly forward towards the horse's poll, and gently come back into contact with the saddle at each stride.
Your lower leg moves very slightly. There should be no back and forth motion (swinging of the lower leg), but an 'in/out' motion. As you ride, you lower leg straightens and more weight is placed in your stirrup. Thus the lower leg is 'out' or off the horse's sides. As you sit, the lower leg closes on the horse's side, encouraging the hind legs to step forward and under. Hence the 'in' phase.
Watch that your hands stay still relative to the horse, not your body. A common error is to 'attach' your elbows/hands to your pelvis, so that to go forward and back with the pelvis movement. This creates a 'loop' in the rein at every other stride, knocking the horse in the mouth, which will lead to evasion and resistance. Allow your elbows to hang by your sides, and carry your hands just above the wither, in front of the saddle with a fists's gap between them. As you rise, watch your hands occasionally (looking down isn't a desired habit, but this will be beneficial in this case). Do they remain exactly where they are, just in front of the saddle, or do they move around? If they move around, hook your pinky fingers under the saddle cloth while you rise. This is show you how much movement you are making with your hands, and will train them to remain still.