Three basic bits go together. The software, usually on a PC, something like UCCNC or Mach3, provides a user interface so you can control things, and reads the gcode file that effectively says something like "go from this XY position to that XY position." Then there's a motion control stage that converts those coordinate moves into something your machine understands - it turns XY moves into the right number of pulses to drive your machine the right way, interleaving X and Y pulses ("steps") to get smooth movement. This bit used to be done by Mach3, for example, but nowadays is usually done by the external motion controller - something like a UC400 or AXBB device. That produces step pulses and direction signals that go to the stepper driver which, in effect, amplifies them to high-power signals that go to the motors to drive them. The DM542 is a stepper driver - the last bit in the chain before the motor itself.

All a bit of a simplification but that's the gist of it. Takes a little while to get you head round first time through the process.