Geared Motor w/ encoder and 6 wires

Hi All,
Not sure if I am missing something or just not searching correct terms. Most Geared DC Motors seem to have encoders build on them. From what I read this the right route for a robot drive in order to precisely control the motors rotations, I think. Either way these motors all have 6 wires (Motor +, Motor -, VCC, GND, A, B).
My plan is to use a raspberry pi 3 B+ with a motor controller, but since this 6 wire mystery came up, I have no idea what I am doing. I understand stepper motor requirements and wiring, and simple (+ -) DC motors, but I am at a loss here.
Do I need a special Controller?
Do I need a normal Controller and the extra wires go to the GPIO somewhere?
If Q2 is the case, where would I find coding examples for that since I can’t even seem to find wiring diagrams for the motors?

Thanks in advance,

Your Pi can use it as a dumb dc motor, but when you need closed loop control, you have to read channel A+B as a “quadrature encoder”. It’s best to use interupt-routines for that part. Otherwise you might miss a signal or two.
I’m not sure, if python is good in interupts?
I’ve only written a code that treats these geared encoder motors like a stepper-motor for an Atmega-chip.