Brevetoxin is a kind of neurotoxin produced by Karenia brevis.  K. brevis is a species of dinoflagellate, a group of the Kingdom Protista. They are a kind of algae, which means they are subject to the occurence of algal blooms, in which the ordinarily less noticeable populations of algae explode to much more noticeable levels. It is at these levels that K. brevis begins to pose a problem, as the brevetoxin it produces reaches concentrations high enough to harm humans, whether through direct contact, consumption of contaminated shellfish, or inhalation of the toxin carried through the air.
Although a number of Karenia species have been described as of yet, K. brevis, the main producer of brevetoxin, occurs primarily in the Gulf of Mexico, particularly on the Western Gulf coast of Florida. It occurs in other parts of the Gulf as well, as far west as the Texas coast. K. brevis occurence outside the Gulf of Mexico is uncommon, but it infrequently occurs in the waters of the Indian River Lagoon on the Atlantic coast of Florida. A bloom in 2007-2008 was enough to bring K. brevis levels in the lagoon high enough to make the shellfish in the area dangerous for consumption. Algal blooms can occur at virtually any time of year, but their occurrence seems to be increased between the months of September and February.
The reasons for red tides are not completely clear. However, algal blooms are typically believed to be caused by an influx of nutrients combined with proper temperature, water, and light conditions for optimal algal growth; red tides are probably not dissimilar. They originate between ten and fifty miles offshore, along the continental shelf, where it has been hypothesized that the Loop Current brings nutrient-rich water from the Carribean into the area. This initiates favorable conditions for an algal bloom, and these areas are aptly known as "initiation zones". From there, the currents or winds bring the blooms further inshore, where more nutrient-rich water encourages increased and continued propogation of the dinoflagellates. A second proposal consists of the possibility that the nutrient-rich waters may originate in the Mississippi River, carried down the coast of Florida by a summertime shift in the winds, affecting the currents in the Gulf simultaneously. Both scenarios consist of the simultaneous occurence of such favorable conditions, however. 
Physiological reasons for production of brevetoxin by K. brevis is subject to research and debate. One study conducted measured whether brevetoxin production responded to changes in water salinity, determining that intracellular concentration of brevetoxin increased from 10% to 53% within five days of a water salinity change from 35 to 27. The lowered water salinity would make it difficult for K. brevis to maintain intracellular sodium concentrations due to hypoosmotic stress, as sodium flows out of the cell, or water flows in, in a natural attempt to maintain a concentration balance between the cell and the surrounding environment. The function of brevetoxin is to attach to sodium channels in cell membranes, forcing the sodium channels open to allow for influx of sodium ions. In the dinoflagellates, this could serve as a physiological mechanism to help maintain sodium levels inside the cell when water salinity changes. However, it is not definitively known to function as such within the dinoflagellates. Scientists have suggested brevetoxin's function to lie also in utilization as an allelopathic chemical, whether to give the organism a competitive edge over other species of phytoplankton, or against organisms which may feed on the plankton.
Affliction and Symptoms
The amount of toxin produced in small numbers of these K. brevis is typically not dangerous. However, when they reproduce en masse, as in the case of the red tide algal blooms, enough brevetoxin is generated to be considered dangerous to humans, as well as other kinds of life. Wildlife is most directly affected, specifically those species which depend on or live in the ocean, such as fish, water fowl, sea turtles and dolphins. Animals that largely depend on affected animals as a food source, such a coastal raptors may not directly contact the water enough to feel the effects of the toxin directly. However, they are also affected due to the decrease in uncontaminated or fresh food sources. Humans tend to be intelligent enough not to swim directly in the red tides, although contact of brevetoxin to skin can lead to toxic effects. Instead, humans are most often exposed to brevetoxin through consumption of shellfish contaminated with the chemical. These shellfish are capable of building up increased concentrations of brevetoxin over time, potentially resulting in greater levels of toxicity than from simple contact to red tides. In rare cases, inhalation is possible if brevetoxins are swept into the air by ocean surf or onshore winds.
Illness onset following consumption of contaminated shellfish is known as Neurotoxic Shellfish Poisoning, or NSP, wherein brevetoxins will proceed to affect the gastro-intestinal (GI) tract as well as the neurological system. GI tract related symptoms include vomiting, diarrhea and pain in the abdomen. Neurological symptoms consist of paresthesia (a pricking, tingling sensation), reversal of perception of hot and cold temperature sensation, vertigo (false sense of motion), and ataxia (involuntary muscular movement, or spasms). Inhalation of brevetoxin may result in coughing, dyspnea (shortness of breath), and bronchial spasms.  No human fatalities have yet been attributed to NSP, but the concentrations of brevetoxins produced in annual algal blooms are responsible for significant annual animal fatalities along the Gulf of Mexico and the south/mid-Atlantic coast. 
In innervated organisms, brevetoxin causes problems with the basic functioning mechanism of nerves. Nerves operate through changes in electrical charge through sodium-potassium pumps. Ordinarily, these pumps maintain a slight negative charge inside the cell relative to the outside. The nerve cell fires by allowing sodium ions into the cell to increase the relative charge, generating electricity and creating an action potential. Brevetoxin binds to the sodium channels and allows for unmitigated flow of sodium ions into nerve cells. This results in the general loss of fine nervous control, evidenced by the paresthesia, ataxia, and other symptoms. Gastrointestinal symptoms result from Brevetoxin's interference with proteins necessary for proper regulation of sodium secretion by intestinal cells. Extended exposure in such a fashion may also be linked with formation of tumors in the GI tract, but the process behind this has yet to be identified.
Brevetoxin is a compound produced by the dinoflagellate Karenia brevis, which can become dangerous when produced at high enough concentrations, as in the Red Tides. It has reached public attention as a result of the neurological effects the toxin can have on people and other life forms; it forces open sodium channels in nerve cells, resulting in difficulty on continued nerve control from triggering unregulated action potentials. A number of people have become very ill because of red tide related increases in brevetoxin concentration, primarily through consumption of contaminated shellfish.
Recent research suggests, however, the brevetoxin may not be completely for the purposes of harming organisms that may harm the dinoflagellates. Increased brevetoxin production resultant from salinity shock points to the possibility of some intracellular regulatory function of the toxin, perhaps as a way of maintaining sodium concentration within the cell as a result of lowered external sodium concentrations.
Errera, Reagan M., and Campbell, Lisa. "Osmotic stress does trigger brevetoxin production in the dinoflagellate Karenia brevis". Proceedings of the National Academy of Sciences of the United States of America. June 18, 2013. Vol. 110, No. 25. Published Online June 10, 2013.