Pir sensor read for 10 minutes

6v6gt:
You simply read the Arduino pin to which the sensor is connected in the main loop().
You have to record the time in millis() when the last movement was detected to be able to turn the light off after a certain period.

The state change detection example shows how to determine if the state of the sensor changed - from "I see motion" to "Nothing moving here" or from "All is quiet, all is calm" to "Hey, what the f**k was that?" (or something like that).