https://en.wikipedia.org/wiki/Code-switching
> In linguistics, code-switching or language alternation occurs when a speaker alternates between two or more languages, or language varieties, in the context of a single conversation or situation. Code-switching is different from plurilingualism in that plurilingualism refers to the ability of an individual to use multiple languages,[1] while code-switching is the act of using multiple languages together.
The whole rest of the article is the result of linguists studying it.