If you look at the Beginner freediving thread, "How to start freediving" you will see some pocket definitions of black outs... there are several kinds and they are caused by different kinds of gas imbalances and, in some cases, external issues related to pressure differentials.
If you are serious about freediving, try to pencil in a course with our hosts or
www.performancefreediving.com There is an intensive physiology discussion that most deepwater swimmers could well benefit from
The pocket answer to your question about preventing shallow water blackout is:To prevent most kinds of blackouts - use proper ventilation and breath-up techniques, make certain your surface intervals are at least 2-2.5times as long as your previous submersion, practice Tolerance Training and get very familiar with Apnea, and, of course, one shouldn't dive alone. Training, experience, intellectual understanding of the process of freediving, will make you a safer diver.
This site is a great resource.... we all love what we are doing.
Lungfish