LDR circuit

LDR = Light Sensitive Resistor, at a certain light resistance level the sketch turns the LED on.

You could change the LDR for a potentiometer and load the example sketch AnalogReadSerial to see what happens.

The Analog Input is another example sketch which shows how to use analogin to change the blink rate of the LED.

In the Arduino IDE goto File - Examples - Basics - AnalogReadSerial for the first example
and File - Examples - Analog - AnalogInput for the second example.

In your case it sounds like the LED is being switched on and off very quickly, which should not happen, replace the LDR with a POT and see how that affects the LED.