tryiing to get a stepper motor to work on ardiuno

Closer inspection of your picture leads me to think that you have a L239D H bridge chip.
Assuming you have then try running the MotorKnob example bundled with the Arduino IDE, you might need to change some of the pin bindings. If this works then replace the code in setup() and loop() with this:

void setup()
{
    stepper.setSpeed(30);
}

loop()
{
    stepper.step(100);
}

watch your motor turn, if it goes more than one turn, then reduce the number of steps set by #define STEPS on line 13. If it goes less then a turn then increase the number of steps. Once you have found the number of steps per turn then you can follow the code suggested by PaulS

Chris