Project inspired by the work at http://mrrwa.org/wp-content/uploads/2011/07/ModelRailroadingWithArduino.pdf
Just connect a wire from pin 9 to the resistor, from the resistor to the long leg (+) of your LED, and the short leg to Ground.
int ledPin = 9; // LED connected to digital pin 9
digitalWrite(ledPin, HIGH); // set the LED on
digitalWrite(ledPin, LOW); // set the LED off
delay(random(800,2000)); // wait a random bit of time