It can be something harmless, such as an ocular migraine, or normal separation of the vitreous from the retina due to age, but it can also be a sight threatening condition such as a retinal tear. If the condition does not go away within an hour or so, it is best to consult an opthamologist immediately. Retinal tears can often be treated successfully if caught early enough.