A heater is a gun, and Dally has one because he feels he needs a weapon to defend himself from the Socs.
Most of the time, the conflicts between the greasers and the Socs do not involve serious weapons. They usually are resolved with fist-fights, although sometimes crude weapons are brought in. However, occasionally a more serious weapon like a gun will become part of the conflict.
"A fair fight isn't rough;' Two-Bit said. "Blades are rough. So are chains and heaters and pool sticks and rumbles. Skin fighting isn't rough. It blows off steam better than anything. There's nothing wrong with throwing a few punches. (Ch. 2)
Clearly, carrying guns is a rare occurrence. You can see this by how Pony reacts when he hears Dally say he has one to defend himself from the Socs.
"The Socs and us are having all-out warfare all over the city. That kid you killed had plenty of friends and all over town it's Soc against grease. We can't walk alone at all. I started carryin' a heater..."
"Dally!" I said, frightened. "You kill people with heaters!"
"Ya kill 'em with switchblades, too, don't ya, kid?" Dally said in a hard voice. (Ch. 5)
When Johnny killed Bob, it made things between the greasers and the Socs come to a head. While the two gangs were always fighting, a greaser killing a Soc gave the Socs a reason for all-out warfare. This is why Dally feels that he needs a gun. The greasers usually travel in packs when they can, to defend each other. However, since they are now targets, he feels he is better safe than sorry. The Socs will gang up on the greasers now more than ever.
When Johnny and Ponyboy got into the fight with the greaser, it changed not just their life, but the lives of all of the greasers and the Socs. Now the greasers and Socs have to fight each other, because the Socs want revenge. The greasers also need to defend themselves, but they want revenge on the Socs for attacking Johnny and Pony. It’s a viscous cycle.
A heater is a type of gun, or ant type of firearm, and the reason Dally has one is mainly to scare off socs, and impress other greasers