Is it doing this all the time or just when using a specific app? I would suggest restarting the phone in "Safe Mode" to see if it happens while in there. If it does, then you may want to have the phone checked for hardware issues. If, however, it doesn't happen in "Safe Mode" then there is something on the device that is the cause. A setting in your sounds for the phone, a bad app, virus, malware, setting within a specific app, etc. You will have to locate the exact cause to then resolve it (remove app, remove virus, change settings in an app, etc.).
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.