I've been teaching high school math for almost 25 years now and I'm still learning how to do it well. I love it partly because I'm always learning. I also love the fact that I get to start over every year. You will probably make some big mistakes. Own up to them and recognize them as opportunities for learning. You're going to do it better the next time. And even better the time after that. Eventually, if you work at it, you'll be really good at it. But never perfect. This, of course, is what we want our students to understand. It's why we encourage pencils and extra erasers in math. (When the opportunity arises, point out this concrete reminder that students are expected both to make lots of mistakes and to figure out how to fix them.)
It is important to have an interest in, enthusiasm for, and a good understanding of the subject you're going to teach. Just as important, though is appreciating the transformative power of the human relationship you have with those you teach. Remain aware and respectful of the responsibility that comes with this power and you will find that it can help you to help your students to grow in ways that you and they might never have imagined. Some of your students will arrive with an inherent interest in your subject and others will arrive with a true distaste for it and others will be somewhere in between, but any student who feels challenged, respected and cared about during her time with you will deepen her understanding of the subject matter and will, at a minimum, be at least as confident in her ability to learn as she was at the start of the course. Some will even come to enjoy a subject they previous disliked or will develop a whole new sense of their power (and of the tools at their disposal) in the face of a challenge. Though it may seem paradoxical, acknowledging that there are other demands on students' time and that are lots of things that they care about more than your class, makes students more likely to learn the things you are trying to teach.
Be prepared, but be attuned to the moment. Understand the day's material well, but don't be afraid to let the class develop in a way that is different than you had envisioned. In planning a class, think the most about what questions you should ask. Then give time for people to reflect, and listen (really listen!) to the answers. Look for opportunities to help students come up with great questions. And then let them try to answer them. Here's a practical example that I only hit upon very recently: I show a good mathematical animation in complete silence for a minute or so. (You'd be surprised how long a silent minute is!) I then ask that each student to come up with at least one question. It can be as simple as "What is that red thing?" or it can be a question that gets to the heart of the concept in the animation. Either I or a student writes the questions on the board as they are asked. When all of the questions are up there, I have a much better sense of what the students already do and don't understand about the concept. And once someone has asked a question, they want to know the answer. Often, after all this, students are able to arrive at answers to many of the questions through discussion among themselves. (By the way, if you have students do presentations, this can be an effective framework. They have to present something without words and see what people ask. Then they start answering. It makes those presenting think about how they are going to create something which will elicit questions and it engages the whole class in a way that more traditional presentations do not.)
Be fully aware that we don't remember normal-run-of-the-mill things (as opposed to scary things like meeting a tiger on the street) the first time we encounter them, even if we are paying close attention. Have you ever had the experience of meeting a whole room full of new people and listening carefully to each name as it's mentioned and then discovering when you see the people the next day that you can only put names to half of them? (If you haven't ever had this experience, you're likely to soon!) The same thing is true when someone first learns what the sine of pi is. We need to practice recalling and using information over and over in order to really know it. We tend to think that because the material in the book or our notes looks familiar when we read over it, we know it. Students will say, "I knew all this before the test, but I couldn't remember it on the test." If you ask them about how they studied in these cases, you will usually discover that they didn't try testing themselves on the material (by doing problems, including ones that look hard) before they took the test. It's hard for them to realize that they didn't really know it before the test either. Be creative in thinking of ways to get students to practice recalling information. Work it into class every day.
Tests and quizzes that "count" (summative assessment, in the current lingo) are also, of course, opportunities for students to practice recalling information. To give them even more practice, allow them to retake tests and quizzes (with questions changed slightly from the original). So what if a student does badly on the first test all the time and still ends up with a good grade? They've learned the material! Isn't that what we're aiming for? While it's certainly possible that students will study less for the original test when they know they'll be able to do a retake, that's okay. Or even good. We all retain more information over the long term through "spaced study" than by cramming. Besides, my experience is that the possibility of a retake doesn't make students less interested in doing well on the first version. We all want to do well. No one ever wants to be seen as bad at something, but knowing they can try again helps students to understand that an initial failure (however they define that) is not the end. It frees students to approach the first test with less concern about the consequences of a poor performance and it makes them more likely to actually practice problems (specifically the ones from the first test) than they were the first time.
As much as you possibly can, give back things students have submitted the next day. It keeps you from assigning more than you can keep up with. It lets you use anything you learn from the students' work in planning what you'll do next. And apparently (based on what my students say), most teachers don't do this and students love it. Thus, it generates a lot of good will and you're going to be able to use all the good will you can get!
Read Carol Dweck's Mindset and Daniel Willingham's Why Don't Students Like School? (The latter, by the way, is much better described by its subtitle: A Cognitive Scientist Answers Questions About How the Mind Works and What It Means for the Classroom.)
Finally, here's a way to learn names on the first day that will help students as well as you. As a bonus, you'll hear what students prefer to be called and how they pronounce their own names. Don't worry that students will think this is stupid, my experience is that they enjoy getting up and doing anything on a day when teachers tend to talk about books and grading policies. Have the students form a semicircle ordering themselves alphabetically by first name. Then have each person introduce himself or herself (first and last names) and the person to their right. You can take notes on pronunciations, nicknames, and distinguising features the first time through, paying most attention to the first name. If you have time, write down one thing the name makes you think of. Then have them do it again, this time introducing the person to their left while you check and add to your notes. Then ask if anyone can give the first names of everyone in the line. Believe it or not, there's always someone who's eager to do this. (Tell them that if they get to someone and forget, they just need to ask!) Try to anticipate each name before the student doing the reciting says it. If there were lots of volunteers the first time, see if anyone else wants to try. Though I've never done it, you could also take a class photo at this point to have something to study. Then have everyone sit back in their seats and ask for a volunteer to name everyone now that they're all mixed up. Finally, you try it. (Remember, if you forget you just need to ask! Students are not expecting you to know their names on the first day. It's OK to make mistakes. You're learning from them.) If your class has a lot of students who don't know one another, start the next day by asking for a volunteer to name everyone. If no one volunteers, that almost certainly means that the group would be happy for some review, so once again have each person introduce themselves and the person who came before them. Then see if anyone is willing to try naming everyone. And when you're wondering why students can't remember what the sine of pi is even though you went over that yesterday, think about how much concentrated effort it took for you to get all these names straight even though you heard them at least seven times in one day and already understood the basic concept of names.