those balls are filled with pollen that will eventually open up and spill everywhere.

when the balls open up and pollen comes out, then the female plants "take in" the pollen. it sticks to the white hairs (pistils) coming from the female plant.

once pollen comes in contact with a female plant that is flowering, then that female plant will start producing seeds.

thats is how seeds are formed, more or less.