Bilingualism is when a person understands and/or uses two or more languages, regardless of their level of skill in any language.
Some children are exposed to more than one language all of the time (this can be called simultaneous bilingualism) and others may start to hear additional languages after learning their first one (sequential bilingualism).
Codeswitching (or language mixing) is when a person uses two different languages at the same time, this may be different for different sentences, or may be within the same sentence. This is normal, and does not indicate confusion or an impairment.