You are likely experiencing something called a floater.
Floaters can take the form of floating clumps, dots, spots or lines or cobwebs (they can come in many shapes and sizes). They are actually tiny pieces of the vitreous jelly that occupies a large amount of the volume of the back of the eye.
Does this make sense?
This vitreous jelly, when we're born, is the consistency of a jello jiggler (thick jello). As we age age, the vitreous gel inevitably liquifies and becomes more fibrous bands and water. Because of this liquification and the resultant fibrous bands that are left, there becomes more points of traction that the jelly exerts on the back of the eye where it is attached. As we move our eyes in different directions and as our pupils change shape, or even as we rub our eyes, some of these bands can become unattached from the back of the eye and a piece of it floats around, attached still to the rest of the jelly. It is this traction of the vitreous jelly on the retina that can sometimes produce flashes that you may see or may not see, or may see in the future.
By and large, floaters are so common and so frequently associated with aging that they are essentially normal, even though they are common in younger persons as well. While most people do not completely get rid if their floaters (they never completely and permanently go away), they usually get "better" from these floaters through one of more of three different mechanisms: 1. They can sometimes break up to some degree; 2. They may drift more out if your view; and 3. The brain usually learns how to ignore them to a large extent (and then they usually only become "visible" when they get "stirred up" by moving the eyes quickly from side-to-side or rubbing the eyes when looking at high contrast backgrounds such as white paper/walls, a bright sky or a computer monitor).
If you have or develop them, flashes tend to be small, like starbursts and are usually intermittent; they can also appear as an arcing light. One of the most important things to understand about floaters is that the process of a new floater happening can rarely lead to a retinal detachment, so it is important to know the 4 signs of a possible retinal detachment. These are: 1. sudden increase in or new floaters, 2. flashing or arcing lights that are frequent or persistent, 3. a shade/shadow/spot in your vision that you can't see light through, or 4. a large drop in your vision which doesn't improve after a few minutes. For any of these symptoms you must see an ophthalmologist as soon as possible.