One of the hardest parts about being a teaching assistant can be understanding what your role is from the perspective of the instructor, your students, and even yourself. While expectations may vary by instructor and course, there are some things to consider ahead of time to make your life a little easier.
There are some broad expectations of you—from both your instructor and your students—that are generally consistent across disciplines. Beyond these, though, expectations often differ depending on your course or instructor. To make the best of your teaching experience, it is helpful to establish these expectations at the start of the semester. Meet with your instructor before the course begins to understand what they hope to accomplish with your lab or discussion section and how they hope to work with you to accomplish course goals. Visit this site for suggested questions to ask in this first meeting.
Set ground rules with your students from the beginning to be clear about what you expect of them, as well as what they can expect from you.
This TA handbook from Carnegie Mellon University is an excellent resource for understanding your role, setting expectations with your instructor and your students, and it's full of tips on handling different sorts of classroom circumstances.
If you're wondering how to frame your role in your specific classroom, read more here about running a lab and here about running a discussion or seminar.