If your motors are rated above about 2.8A and you are using the Duet WiFi, or above about 2A and you are using the Duet 0.6 or 0.8.5, or if they need higher voltage than the Duet can provide, then you need external stepper motor drivers. These generally have optically isolated step/dir/enable inputs. For example, stepper motor drivers rated at up to 5A using the TB6600 stepper driver chip are widely available on eBay.
If the drivers require no more than about 2mA @ 3V on the step, dir and enable inputs, then you can drive them directly from the expansion connector of the Duet. See the Duet WiFi and Ethernet wiring diagrams for the expansion connector pinouts. Otherwise, you should use 3.3V to 5V level shifting ICs such as 74HCT04 to boost the signal level to 5V and drive them. You can use the Duet Expansion breakout board for this purpose.
To remap the X, Y or Z motors to external drivers in RepRapFirmware 1,14 or later, use the M584 command (see [[G-code#M584:_Set_drive_mapping]]). The Enable signals on the expansion connector are active low by default but you can change this using the M569 command (see [[G-code#M569:_Set_axis_direction_and_enable_values]]). You can also set a minimum step pulse width in the M569 command (try 1us or 2us when using external drivers), and configure the direction.