Your eyeball is filled with a clear, jellylike substance called vitreous humor. When you're looking at something, light bounces off your vitreous humor and enters your eye through the pupil, the black dot you see in the center of your eye. The light then passes through your lens, which focuses the image on your retina, the light-sensitive tissue lining the back of your eye. Your retina helps send this information on to your brain to process.
Sometimes stringy clumps of opaque cell fragments can develop and float around in the vitreous humor. If a floater gets in the way of the light coming into your eye, it will cast a shadow onto your retina, which you then see, according to the National Eye Institute, part of the National Institutes of Health. As you get older, floaters tend to become more common. According to the institute, they're also more common in people with severe nearsightedness or diabetes.