How to use Arduino UNO to control's Joystick's motors?

I have a sidewinder joystick as in the photos and there are 2 motors control force feedback for x and y axis. What should I start to write a code in Arduino to control a cursor on computer screen to control the joystick with those motors? There are 2 pairs motors’ power cables and I think I can connect those cable to an Arduino UNO pin to control those motors.
Thank you in advance!