How long do they last? Do you see flashing lights? Do you get a headache with it? What medications do you take? What other medical conditions do you have?
There are two common causes of these symptoms:
One are floaters. There is a gel inside of your eyes. As you age, the gel breaks up into little pieces and float around. Sometimes, you can see flashing lights along with them, but usually not. They are harmless, but can be annoying. Eventually, they settle down and you don't see them all the time.
The second is ocular migraines. People with ocular migraines often see visual disturbances. Some lose part of their vision (like in a stroke) temporarily. Sometimes, this is followed by a headache. These are caused by the same pathology that causes migraine headaches; and they are treated the same way.
Hope this helps and thank you.