Respect from Students
I think I get respect from students by being fair and treating all students the same. The easiest way to lose their respect is by playing favorites.
The second thing I recommend is explain your decisions. I give my students an explanation for everything. That goes for all our assignments. Any worksheet I pick, I tell them why it's a good worksheet, or if there is anything on the worksheet I don't like. Any project we do, I tell them what they are going to learn from it. I give them practice tests to study with; I don't want there to be any surprises. When a student acts up, I make sure they know why they are facing certain consequences.
The third thing I would recommend is give the students choice. It shows that I respect and trust them enough to give them responsibility in the class. I give them little choices during the class so they know they are involved, it's not just me telling them what to do. When I want the students to work on practice problems, I always tell them, "I don't care if you work by yourself or in a group. I trust that you know what works best for you. Move the desks any way you want." And they do. I can usually tell how well the students understand the material by the way they rearrange the desks. If I did a good job teaching them, they work independently. Every now and then, the lesson is completely over the students' heads, so they move the desks into one big group. That's their signal to me that we need to do more whole class instruction before the students practice what they learned.
I even give the students some choice when they are being punished. I don't tell a student they have detention. Instead I say, "What day?" It's much less confrontational. The students seem to take it better. If I say, "You have detention," I have to listen to them argue with me. If I say “What day,” they start thinking about what day they want detention, not how to argue their way out of a detention.