Students' getting bored in the classes is a very common problem. It may arise due to the length of the lessons. We can't expect students to focus on what we teach during the whole lesson.There are some ways to prevent it.
As an A plan, we can divide the lesson into two or more parts. Imagine your lesson takes 40 minutes.You can divide it 20 minute-parts. For instance, in the first part you teach grammar and in the second part, you can get students speak about the topics related with what they have learned in the previous part.
Transitions are also important to attract students' attention. While passing to another topic, you can get them listen to music, play games or just chat .If you think the topic will take the whole lesson, when the students start to distract and get bored, stop teaching ,do something different like watching a funny video. When they are dynamic again you can turn to your real topic and you will see they are listening to you more carefully.
Using mimics and gestures is vital as they play a big role in being students' focus.
They also help you to teach with drama.I think all the teachers should be given drama lessons before they start the profession. It is not common in ELT departments in universities now. But I hope it will.
Your voice level plays yet another important role in teaching.If your classes are very noisy, you constantly yell and shout at them, they will start to ignore you after a while.
Change your method,now. Just move your mouth as if you are talking. They will stop making noise and try to get what you are doing.
As the students are used to teachers lecturing loudly or constantly in same tone, this time,try to speak with a softer and calmer tone. It will work.
Sometimes change your voice tone unexpectedly and puzzle them.
The students totally focus on when they are puzzled.
So ,why not puzzle them?