A CNC router machine is probably the most useful tool a hobbyist can own, but the price for a CNC machine on the market is way more than the average hobbyist is willing to spend. You can build your own CNC with very basic tools, little knowledge of machinery, mechanics, or electronics, but be warned, these machines are inherently dangerous, so wear the proper protection and use common sense. At the very least, read the instructions and precautions on every tool you use.
Now, a CNC stands for Computer Numerical Control, but that is gibberish. It does hint you to the fact that something is controlled, and probably by a computer. It's really a mechanism that interfaces to a computer to control its movements, similar to a robot, but this machine has a specific function. It cuts or shapes things with this control. In essence, a computer precisely controls a cutting tool, like a router for instance, to cut materials such as wood, plastic or metals into shapes only bounded by your imagination.
This video tutorial will show you how to connect the y-axis motor wires for a CNC router. To describe the bigger picture, first mechanically, the motors must turn the screw to provide linear power transmission (movement back and forth). The motor needs power to turn the motor shaft, so the motor connects to the driver board that will accept three motor connections, one for each axis. The driver board is connected to a power supply to provide power to the driver board. The computer is also connected to the driver board to provide step pulses and direction instructions.
In this video, you will see the wire connections to the motor, with detail on the motor wire/coil concept. The driver that is assembled is compatible with Unipolar Stepper Motors. Unipolar motors have different combination on how the wires and how many wires are connected.