How do I set up

How do I set up the cameras so when it detects motion at night, the light comes on and then goes off after a while