Indeed many languages have similar sounds and so the brain and your body's muscle-memory often try to default to that.
Or if the language you are learning has two sounds and your own language has one that is somewhere in between, you make the in-between phoneme and speakers of the language you are learning mis-hear you.
e.g., the English /b/ and /v/ sounds (/b/ is a bilabial plosive, using both lips, with the sound exploding out; /v/ is a labio-dental frictive, using a lip on the teeth with the air coming out with noise produced by friction; both are voiced), while Spanish has a bilabial frictive a sound in between made with both lips but the air coming out with friction (e.g. in Los Viejos [spelling uncertain])
So a Spanish speaker sayng /b/ sounds like a /v/, and saying /v/ sounds like a /b/ - in fact for both, they are producing a sound in between.