You should mute your microphone, when not in use. This is not a 100% protection against espionage, but helps against normal accidental recording.
How to fix it
macOS 10.11 – 14
- Go to “System Preferences” > “Sound”
- Choose tab “Input”
- Choose your microphone device. Normally “Line In”
- Move the input volume slider totally to the left side.

