Imported vocabulary/borrowed words simply describes loanwords that make it into the common lexicon of speakers of the receiving language but not necessarily speakers of the donor language.
There is a distinction, however, that not all words that are used via code-switching are going to become part of common enough vernacular that it would become accepted within a language, and likewise, there may be cases where loanwords do not enter a language via speakers that code-switch it into their daily vocabulary.
But kindergarten is imported the whole world over. You can't say you know German based on that. Code-switchers understand the grammar of both languages, not just a few words.
I do think the Normans entering England, or Germanic peoples mixing with Celts, or Celts being conquered by Romans for a brief time -- all of that probably produced code switchers in their moment in time, with lasting impact to our vocabular and grammar. But it's not code switching anymore. It's modern English now.
Similar things happened in Spain with Celts, Romans, Arabs, Goths, Basques... Not to mention all the regional Romance languages that survive today (Galician, Catalan). They conquered the Americas and got some infusion of that vocabulary too. Castilian borrows vocabulary from all of these. But monolingual Castilian speakers do not "code switch".
You also know a little bit of Indian language you yogurt guru.
You don't have to be aware you're using words from other languages to be speaking words from other languages.
Adiós amigo.
When the first person used "hotel" in an English sentence, they were struggling to find a suitable word and failed, and fell back to another language for it. Or possibly they thought it was a better word than the English equivalent for some reason. They thought of it as a French word, with all the implications of it in French, rather than English.
When I use "hotel" in a sentence, it's just part of the language I grew up with. To me, it's an English word, not something I fell back on in another language.
That said, the "Spanglish" referenced here is being learned from birth by people, so they aren't context switching either. They're just speaking how they learned to speak. Older people are probably still context switching, but younger people likely aren't.
Borrowing might have started out as code switching, or something else, but when you use words borrowed a long time ago from Y in language X, people who know X but not necessarily Y will probably understand you. There are of course technical terms that you might use which not everyone will understand. Some of these will have been borrowed from another language, like electron or perigee or perihelion, while others might be words made up and not borrowed, like quark or boson or fermion. The fact that some were borrowed, and others not, does not make the one code switching and the other something else.
And if you're code switching, you'll probably be pronouncing the words from language Y with the expected pronunciation of Y, whereas if you're using words borrowed from Y into X, they will probably be pronounced differently from how they would be pronounced if you were code switching into Y (or just speaking Y), and the semantics may have changed. Take the word 'mesa' in English, describing a flat-topped hill in the southwest. If you're a non-Spanish speaker, you'll probably pronounce that last vowel as a schwa, and only have the flat-topped hill meaning in mind. Whereas if you code switched into Spanish, that last vowel would probably sound like the /a/ in 'father', and you might be talking about a table.