You can turn off the flashlight on an iPhone in two different ways, by swiping to the Control Center or (partially) swiping onto the Camera app.