During the first 5 seconds that the Arduino sketch for this project runs, it will read the value on analog pin A0 which has an LDR connected to it. The highest and lowest values read on A0 will be saved. After the 5 second period, the Arduino will expect to get values between the highest and lowest values that it saved. It has thus been "calibrated" to these values.
After calibration, the value on the A0 analog pin will be continually read. The value that is read will be converted to a value between 0 and 255. When the minimum saved (calibrated) value is read, it will be converted to 0. When the maximum saved (calibrated) value is read, it will be converted to 255. Any value between the maximum and minimum calibrated values will be converted to a value between 255 and 0.
The converted value is used to change the brightness of the LED connected to Arduino pin 9.
As an example: If the values read from A0 during calibration were between 20 and 100, then in the main program when values between 20 and 100 are received, values between 0 and 255 will be output to the LED.
Without calibration, the LED will never reach full dimness (0) when the lowest value (20) is read from A0. The LED would also never reach full brightness (255) when the highest value (100) is read from A0.