The purpose of the research are kind of code-switching and code-mixing, the factor of the result from the code-switching and code-mixing; and the role of the code-switching and code-mixing in the Indonesian lerning of the seventh F class SMP N 2 Brangsong, Kendal regency. The research used descriptive qualitative method with case study approach.The research used purposive sampiling and snow ball sampling, then the technique of the collecting data by record, report, and interview. Validity test is triangulation theory.The result of the research are: the first, find out 12 code-switching in the javanese is four times and from Arab is 8 times; the second, find out the code-mixing consist of 44 times divided to be Indonesian dialeg from Jakarta is 12 times and english is 6 times; the third, factor of the result from the code-switching and code mixing from the research devided to be 5 factors (a) personal and speaker, (b) the partner of the speech, (c) the place, (d) topic, and (e) function and purpose.