What you are seeing in front of your eyes are something called 'floaters.' Floaters are probably the most common eye condition and, usually, they are not a sign of a serious eye problem.
Your eye is full of a thick liquid called vitreous. This liquid contains multiple proteins and, over time, small bits of these proteins 'coagulate.' This is a normal age-related process, and the number of coagulated bits of protein tends to increase over time. Since these coagulated proteins are not transparent to light, they cast shadows on the retina, which you perceive as moving floating spots in front of the vision. They move because they are, in fact, floating in the vitreous under the influence of gravity.
There is no effective treatment for floaters. Protecting your eyes from strong sunlight, by wearing sunglasses when outdoors, may help slow down their development. At the same time, however, as they are a basically normal phenomenon that everyone has to one degree or another you don't need to worry
that they mean there is something wrong with your eyes.
You should mention them to your eye doctor
when you go in for your yearly eye checkup. However, typically nothing is done about them unless they are so severe that they are impairing vision.