You can't turn off the proximity sensor on your iPhone, but if it's malfunctioning, try force-restarting your iPhone and cleaning around the sensor.
If your iPhone camera won't work, you may be able to easily solve it. Here are some quick fixes to try before contacting Apple.