You can mute an iPhone in two ways, and we recommend doing both when you need quiet. Here's how to turn on silent mode and lower volume on an iPhone.
You can't turn off the proximity sensor on your iPhone, but if it's malfunctioning, try force-restarting your iPhone and ...