And for your random numbers, have a look at this topic in the reference:
http://arduino.cc/en/Reference/RandomSeedand the Blink example was already mentioned:
http://www.arduino.cc/en/Tutorial/Blinkthe random() function in combination with the delay() function can change the interval between on and off of the LED in the range of milliseconds.
If you need something that is more like a candle light, shorter intervals might be more interesting. Please let me know if you want to create a candle light or if the random() function in combination with the Blink example solved your problem.