One way to prevent stings is to shuffle feet when in the water to scare away stingrays. However, if stung, place your foot in the hottest water that you can handle but not scalding hot. The hot water will immediately make the pain subside or be relieved.
Even when the pain is gone you should make an appointment with a doctor to confirm there is no barb left in the wound and for the possibility of a tetanus shot.
Source: 10 News