Connect VDD and GND of the Encoder to the Arduino 5V and GND.
Connect ChannelA & ChannelB to two input pins on the arduino.
Try testing this with a sketch meant for an encoder knob. Simple.
Now, to control the motor with feedback from the encoder, you need to look into PID control, which isn't easy.
// Per.