The vitreous humor is the liquid or gel like substance in the eyeball. It is the medium between the lens and the back of the eye where the retina is located. The cause of floaters is when bits of tissue from the lining of the vitreous humor become loose. They are free to float around in the vitreous humor and will occasionally interfere with the line of sight causing the irregular shapes.
The bits of tissue that come loose is generally a consequence of aging or could be caused by wear and tear or accidents that have occurred. It might also be caused by posterior vitreous detachment. This is mainly a harmless event in the eye but will cause the increase in floaters. It generally only lasts a few days and then the floaters tend to disappear. However if the floaters continue after a few days it is a good idea to see your doctor. The same applies to flashes. Flashes are more disruptive than floaters because they flare up and can make it hard to concentrate on the image. If they continue for more than a few hours you should see your doctor.
In most cases floaters and flashes are not harmful to the eye and are more of an annoyance than anything else. When you first notice the floaters you may become a bit concerned but you will soon adapt to them and learn to ignore them. Of course, as already mentioned, if you notice that the number is increasing over a short space of time then you should consult your doctor as this may be an indication that something has changed in the interior of the eye.