hi
try searching the forum and the arduino.cc site with Google's advanced search, you will find lots of posts on this.
As in the first three links here: arduino encoder - Google Search
In general, you give the encoder 5V and you get two pins that are pulse signals. Reading the phase difference between them tell you the speed and direction.
D