Code-switching is when two different languages or ways of speaking are used in the same sentence or conversation. For example, if someone is speaking English but they switch to Spanish to say one word, they are code-switching. It is common for people who speak two or more languages to use code-switching, but it can also be used when someone speaks the same language but changes the way they speak depending on who they are talking to.