As for the basic principle, imagine you have two piston block, A and B,
A will push object when extended and will not pull back the object when it retracts, i.e.
[A](Obj)
Extend state:
[A]=|(Obj)
Retract state:
[A]__(Obj)
However, B is different,
B will push object when extended and will pull back the object when it retracts, i.e.
[B](Obj)
Extend state:
[B]=|(Obj)
Retract state:
[B](Obj)
If you put them together in this form [A][B], then
See? Both piston blocks move forwards.
Now it is the question of how to make A and B.
There are a few ways to make them and I will only talk about one method.
Check out the following save, try to sprk different electronics to see the exact effect of each mechanism.
There's a really easy to make PSTN mover that can be made only 1 pixel tall.
It works on the principle that PSTN extends a type of PSTN that can be retracted by another PSTN.
And with a little tweaking it can move 1 pixel per frame;