Use a physical gesture to attract everyone's attention. Yelling into the already chaotic room usually isn't very effective. However, if students can see a physcial motion on your part, they are more likely to pay attention.
Adopt a standard physical gesture that means "be quiet and look at me." Enforce class rules that provide consequences if students do not heed your instruction.
Lower your voice and talk quietly and in an animated fashion. If you look like you're saying something interesting, students will want to listen. If your voice is quiet, they will have to be quiet to hear you.
Create an echo routine that you use periodically to refocus your students. Clap three times and point to the class to indicate that they should imitate you. Keep this up for about a minute until all of the students are focused on imitating your clapping patterns. Once everyone is together, you can direct them toward the next activity.
Turn off the lights and inform the students that this is a signal to be quiet and put their heads down on the tables or desks. If you make this a routine, it is another non-verbal sign that you can use to quiet and redirect your class.