This is a condition caused by a wide variety of conditions both from eye disease and structural failure. The retina contains all the visual receptors necessary for vision and is supplied constantly by blood vessels. If the retina is separated from its support structure, the nerve cells will soon die.
Common early symptoms are flashing lights and a feeling of a wafting curtain across the vision. The retina often separates because of fluid seeping through a small tear or a hole, which if spotted quickly can be repaired by laser or freezing treatment, before a full detachment occurs.
Those at greater risk are middle aged short sighted people. There is nothing you can do to prevent it from happening but is extremely rare and there is a small risk that both eyes can be affected.