At a school that is 1:1 with iPads, students can often be seen playing games during their downtime. I teach freshmen and freshmen are perhaps more prone to this behavior, but one of the biggest issues I have is when games find their way into the classroom.
I have a strict policy restricting students from playing games in class and I enforce this policy with full force. Instead of relying on consequences (detention) I use these moments as reflective tools.
I find that when asked, students play games when they are done with work or ahead of the class. In these cases, students feel as if the game is a earned reward. I make a point that in these cases I am not worried about that student being distracted and falling behind, but rather I am worried about the distraction the game provides to others around that student. I ask the student to imagine what it would be like for another student to be working really hard to be on task and ignore the desire to check-out into a virtual setting. When that student sees the game on his/her neighbor's iPad, a lot of that effort is now thwarted. It might be really hard to now build that momentum up again in order to stay on task in class. Without knowing it, that earned reward might cost others productivity.
In other cases, students don't recall making a conscious decision to switch to the game but instead happen upon it when switching between apps. That addictive call can be strong and before that student knows it the classwork is forgotten and the game is all that matters. The student knows it was a bad decision, but is at a loss to explain that decision. And perhaps that is because it was not actually a decision. I then ask this student to reflect on their usage of games on their iPad - how often do they get distracted? I also ask students to think of strategies to avoid this kind of mental ambush from games, but they don't often have experience with thinking through this question. It takes a while, but I lead them to the idea of getting rid of games from the iPad entirely. They groan, but the benefit is clear. What I try to stress is that distractions will never go away - they will likely get worse. But creating a space that is devoted to education and work can be a good habit to start building.