If you using an audio interface this could be "direct monitoring" which just passes through the microphone audio to the headphones.
Each interface is different but just searching by the interface model should have a general user guide for it.
Otherwise it could be a Windows setting (Assuming your on Windows 10) under the sound control panel which can be accessed by:
Searching for "Sound settings" from the Windows menu,
Sound Control Panel on the right,
Recording tab,
Right click your microphone and choose properties,
Listen tab,
Make sure the "Listen to this device" box is unchecked and apply.