Safety is the most important thing while spearfishing. Don’t take this tiny bit of safety as your only safety information regarding spearfishing. There are spearfishing courses that should be taken before spearfishing, but aren't required. People should not spearfish if they aren't confident with diving and have equipment they trust. Keep the spear gun pointed in a safe direction and treat it as if it were always loaded. Don’t point it at anything that you don’t intend to kill or destroy because you can’t unshoot a speargun, and anything it hits will be permanently damaged. Proper equipment and how it is used is a big part of staying safe while spearfishing. Another part of safety is the legal side, so always check your local spearfishing regulations.
The next important thing is that you spear correctly. First, you must find a spot underwater to spearfish in an area you know. Then, secure yourself to something to make a shot more reliable. Then, you should load your speargun by setting it against your thigh and pulling the bands back or pushing the spear in, depending on the type of gun. If the speargun uses a reel, you should wrap it around a couple of times, ensuring it won't get caught on anything. Then, disengage the safety and wait for the fish to come by, only moving occasionally. When you can shoot a fish, just point it and squeeze the trigger. With the spear still in the fish, put the stringer through the mouth and gills, then if it is still moving, stab it in the head, going deeper until it stops.
I have learned some things from my own spearing experience. Move the speargun slowly towards the fish so as not to scare them. Be patient and wait if there aren't any fish for a while, move to a new spot. Sometimes, tapping the speargun against the bottom can attract fish. You need to know your equipment and be comfortable with it. Be respectful of the environment and others. Know the area you are diving so you know what to expect and stay safe. You shouldn’t only follow what people say; continue to learn and develop your style.