Each class will be a little different but here are some ideas that can be used .
Start with clear consistent rules for the class to follow and set limits.
Hear them out
Be prepared for trouble
Always give them your full attention
Depending on the age give time out
Redirect their attention
There are other things you can do. As with any situation it should be handled based on the student, type of problem behavior and your knowledge the situation.