Stingrays use their barb to hunt by stunning or killing their prey. They will often lie in wait on the ocean floor, camouflaged by their surroundings. When a fish or other animal comes close, the stingray will strike with its barb. The barb can penetrate the prey's body and inject a toxin that can cause paralysis or death. Once the prey is stunned or killed, the stingray will feed on it.
Not all stingrays have barbs. Some species, such as the cownose ray and the eagle ray, do not have any barbs at all. These species rely on other methods of defense, such as swimming away or hiding.