This is hands down one of the hardest aspects of being a new teacher. You want them to like you and respect you at the same time, which isn't always an easy balance. The best advice from veteran teachers is this: Be prepared, and be proactive.
When students are engaged in active learning, they're less likely to act up and distract others. Remember that the way you teach, the projects you choose, and the tools you and your students use all impact the learning environment. Aim for maximum student engagement and many of your discipline issues may diminish.
Pay attention to dynamics in small-group learning. If certain combinations of friends are problematic, mix things up and keep them at a distance.
See Tech Integration 101 for more ideas on how to keep students actively engaged in their learning.
The more you get to know your students and their learning styles and personalities, the better you can predict the best situations for their success in the classroom. Do they do best in groups or are they easily distractible? Do they occasionally need quiet breaks or redirection? Anticipate their needs and you'll be able to head off problems before they arise.
Children love to help. The same student who may groan at home when asked to sweep the floor will be first in line to scrub it in the classroom. Take advantage of this enthusiasm and enlist their help! It is important for them develop a sense of responsibility, and helps foster an environment of mutual respect.
Ask students to help think of roles: Attendance Taker, Desktop & Table Cleaner, Homework Monitor, Line Leader, Plant Waterer, Recycling Guru, Gerbil Feeder-you name it. Make a chart or other visual system with job titles and days of the week.
Don't underestimate the value of these jobs in building a community of respect. It will contribute to a positive classroom culture and is an important aspect of practical life and lifelong learning.
Talk to other teachers in your school to find out what works for them. Blog with new and veteran teachers around the country to get tips or share frustrations. Depending on your circumstances, this may be the most difficult aspect of your job. Don't go it alone!
Be sure to visit the Survival Toolbox for links to useful tips from teachers who've been there and done that for many years. Stay strong and in shape when it comes to classroom management, and you'll have more energy to focus on the parts of the job you like best.