The latter is often called a Hawaiian sling...at least in Hawaii. It has three prongs on one end (a 5-6 foot aluminum shaft) and a loop of surgical type rubber on the other. You loop the surgical tube between your thumb and index finger and pull it towards the prong end, stretching the rubber and holding the shaft in your grip. You then point it and release it from your hand to hit your intended target. These are for close in shooting and the fish can slip off the pronged tip. Most have a range of about the length of the spear shaft.
Gun types come in short and long form. The shaft locks into a trigger mechanism and is released by pulling the trigger, just like a rifle or pistol. They use rubber bands, or pneumatic pressure to propel the spear forward. Larger guns use multiple bands for more power and distance (up to 25 feet). The longer ones, having more range, are used in clear (open sea or reef) water for bigger fish. Shorter guns can be used on low vis, close shooting also, similar to conditions good for slings. Gun shafts usually have some type of flopper on the spear tip so after the shaft passes through the fish, it opens and the fish can't pull free. In my experience, guns are also more accurate. I never got very good with slings.