In chapter 21 "imaginary music" i think the main theme was "create your own happiness or to never give up". It was a hot day in May and the children would run through the sprinkler to get cooled off and then go back into class to learn. "it seems they get almost more fun from this than from more organized exertions that take place at public pools where chlorine and perhaps a hint of adolescent danger fill the air." page 273. These children make their own happiness and that what makes the adults happy. They find happiness watching the little ones. When Mrs. Gamble taught her class with imaginary flutes and they "played along" as if they were blowing into a flute too, teaches the children to never give up. Just because they didn't have actual flutes doesn't mean they couldn't pretend and be just as happy.
The biggest factor from keeping students from learning from my experience was other students. Other students can be a big distraction in certain situations. Maybe the boy you like sits right in front of you and you can't help but to think about him while staring at the back of his head. Or the class clown just played another prank on the teacher and the whole class laughs. Some times you sit there in class and think about other things that you find way more important like your plans this upcoming weekend because the topic you're learning about is so boring you can't focus. Some kids sleep in class because they couldn't sleep the night before. The only way to keep students focused is to have teaching techniques to keep them interested. Play a game that helps you learn as well as being entertaining and fun. Give them breaks to socialize with their friends so that they don't do it while you're teaching. Allow them to work with partners and do not just stand at the front of the class and lecture the entire time. Watch movies and take them on field trips, hands on learning is the best learning, odds are i will learn more. Also the parents have a lot to do with it, make sure your children get a good nights sleep, make them eat before they go to school and help them where help is needed. The main responsibility is within the students themselves because they have to be willing to learn.