You can't turn off the proximity sensor on your iPhone, but if it's malfunctioning, try force-restarting your iPhone and ...
To change your restrictions passcode on an iPhone, you'll need to go into your Settings. Where you go from there depends on your iOS version.