Look here:
https://www.quora.com/What-is-the-difference-between-bipolar-unipolar-stepper-motor
To find the coils on a stepper motor, use a DMM on ohms.
4 wires is easy and likely needs no further explanation.
For a 6 wire motor, there will be 2 halves of the motor with 3 wires each.
1 wire will be centre-tap and the other 2 wires will be the coil ends.
*** This is only an example - Wiring colours do vary. ***
We have a 6 wire motor with brown, yellow, orange, blue, green & black wires.
Lets use brown, yellow & orange as an example.
Brown to yellow = 6 ohms.
Brown to orange = 6 ohms.
Yellow to orange = 12 ohms.
Brown is the centre-tap.
There is no continuity from the brown/yellow/orange wires to the blue/green/black wires.
Black to blue = 6 ohms.
Black to green = 6 ohms.
Blue to green = 12 ohms.
Black is the centre-tap.