Code-switching is known to be a widespread phenomenon among bilinguals and in ESL/EFL teaching/learning process; it refers to any alternate use of two codes or languages within the same conversation or even the same utterance. The present study is an attempt to investigatethe functions, types and frequencies of code switching in students discourse in the context of ELT classrooms.The study also explores the relationship between the language proficiency level of the students and their use of code switching. To achieve this end, two groups of students (at two different levels of proficiency) from two classes of general English courses in an institutional program in Oil Ministry Center of Isfahan were selected as participants. All sessions of an entire semester were videotaped. A coding scheme was developed for classifying students’ instances of CS into relevant functions.The data were tabulated, and frequencies and percentages were conducted by SPSS program. The findings indicate that the majority of CS in the classroom is highly purposeful, and related to pedagogical goals. Also, the research found that pedagogical functions were more frequently fulfilled through CS compared to social functions. The findings of this research suggest that code switching is a necessary tool for teachers due to a number of pedagogical considerations in ET classrooms and can give teachers a clue to have a better understanding of student code switching in ELT classrooms and use CS in the direction of teaching and effective learning.