What can I do about a dark floater in my eye after a tennis ball struck it?

See an EyeMD. Blunt trauma can induce a separation of the vitreous gel which is inside the eye behind the lens. It can also damage the iris root and lead to increased eye pressure and glaucoma. See your ophthalmologist to be sure that you do not have retinal tears that can lead to detachment, which is sometimes preceeded by flashes of light, lots of spots or the sensation that a curtain is falling.
See eye doctor. You must see an eye doctor, preferably a retina specialist, asap. You could have a retinal detachment among other things.