First try restarting the phone (turn it off and back on). It may resolve it.
If it doesn't, then try turning it off and then start it up in "Safe Mode". While many things won't work in there, you should be able to test if the camera comes up or not. If it comes up fine, then you need to check the device for bad apps, malware, viruses, etc. as something on the device is causing this. Should it still not work, even in "Safe Mode", then there are two options. Either a "Hard Reset" of the device. Which will completely wipe it and take it back to its original state. So back everything up to a cloud account or a computer first. Or it needs to be looked at for a hardware issue.
To get into "Safe Mode" please do the following.
1. First turn off the phone.
2. Next press and hold "Power" until you see the manufacturers logo on the screen, then release the power button.
3. "Quickly" press "Volume Down" and hold it for few seconds until you see the message "Safe mode: ON" or something similar.
4. If you wanted disable it, simply repeat the steps above, and you should see "Safe Mode: OFF" rather than on.