therefore i need to know more about wheel encoders
Wheel encoders alone may not be sufficient. They will allow you to count how many turns a shaft has made, over some period of time.
Replaying that data is not trivial, but it can be done. Unfortunately, there is no guarantee that replaying the motion (especially in reverse) will result in the same absolute movement of the robot. Wheel slippage is a big factor on some surfaces. Wet grass, waxed floors, carpet, etc. will cause differing amounts of slippage. Hard rubber tires will slip more than soft rubber tires. No two tires are the same size, either.