ItThe formal term is called "code-switching". It happens involuntarily also.
It can be a type of code, and the specific sub-switching called "category is tag-switching" as well for switching words or phrases.
More details: http://en.wikipedia.org/wiki/Code-switching
Also, I found studies about this topic when I searched further It happens involuntarily also.
Tag-switching is the switching of either a tag phrase or a word, or both, from one language to another, (common in intra-sentential switches). In Spanish-English switching one could say, "Él es de México y así los criaron a ellos, you know." ("He's from Mexico, and they raise them like that, you know.")
- Code-switching/Wikipedia