Setting a series of small, realistic goals that lead up to a large goal can motivate students to constantly reach for the next level. Allow the class to be instrumental in deciding what the reward should be for every goal they hit. For instance, for every 15 days without behavior issues, they get a party. Depending on your class, you may choose to reward on an individual basis. Those students who turn in their homework 100% all week could get an extra 20 minutes of free time. Having smaller goals that lead up to a bigger one, such as an end-of-the-year pizza party or field trip, can help students keep their eye on the prize without losing interest in something that feels unattainable or too far away.
Believing in your students can help boost their self esteem and teach them to set their own standards. Make sure your students know that you not only expect excellence from them, but that you know they are capable of it. Allowing them to get away with shoddy, half-done work only reinforces that they don't have to try very hard. You may not always get the very best out of every student, but all students should all know that you expect it and believe they can do it.
Students can really open up if you give them some ownership and control over how the class is run and give them tasks to make it happen. Ask for their opinion on (reasonable) methods of teaching. If they like learning games, take that into account. If they wish they had more group projects, that is worth considering as well. Rotate out the jobs in the classroom to the students, such as feeding the class pet or cleaning the boards, to help them feel like they are part of a community.
Praise is an excellent motivator for your students. Whenever possible, be specific in your praise and praise students when they deserve it. For instance, instead of simply writing "good job" on a math test, mention in your note to the student that you have noticed his scores have improved recently or that he is consistently doing a good job. Offering specific praise will help students feel noticed for their individual efforts. If correction is necessary, be constructive when doing so. The point is to motivate the students to do better, not to demean them. You should be specific about the weakness, but follow it up with a way to do better, for example, "You have been very disruptive in class lately. If I move you further away from your friends, I think you will be less tempted to talk when you shouldn't."
Keeping track of each student's progress is a critical factor in providing motivation. Be aware of how each student is doing in class. When needed, pull struggling students aside for some one-on-one coaching or refer them to a tutoring program. Let your students know that they are noticed and will not be allowed to fall through the cracks. Help them set individual goals and check in as often as you can.