google is your friend.
CNC is a combination of a multitude of parts and effort.
you have to design a thing
lay out all the exact points in space, usually with a CAD program
then create a tool path, usually with more software
take that file and use it to control the motors.
there are a LOT of people doing this sort of thing and there should be a lot of sites that walk you through each step.
it is easy to get the motor to move. but getting it to move with the steps and speed is a lot of work.
google control stepper with arduino to get started.