I think its very close to working I just need to figure out this map function.
The map function is pretty simple. You specify a value, a from range (that usually is expected to contain the input value) (typically 0 to 1023 for analog value mapping), and a to range (specific to your project, usually things like servo limit angles), and the function determines where in the from range the initial value is located, and where the corresponding position in the to range is. It returns the value at that position.
Right now the led is staying high because I dont know what to put in for the second delay.
If the pot reading is 0, what delay do you want? If the pot reading is 1023, what delay do you want? If the pot reading is between 0 and 1023, should the delay be a linear relationship to the value?
Only you can decide whether the map function even makes sense.
Just to verify that something works, forget about map, and make the delay() values the value returned by analogRead().
sensorValue = analogRead(sensorPin);
digitalWrite(ledPin, HIGH);
delay(sensorValue);
digitalWrite(ledPin, LOW);
delay(sensorValue);