It is formed when a star, such as the Sun, sends out atoms. Some of the atoms become ions by gaining or losing electrons and becoming negatively and positively charged. These oppositely charged ions form an ionic bond, sticking together in tiny crystals, a few thousand nanometres across, to form cosmic dust.
Cosmic dust is found in various locations. Intergalactic dust is found between galaxies. Interstellar dust is found between stars. Dust clouds in these places are found by their blocking light from stars behind them, and by their own infrared radiation. Circumplanetary dust is found around planets and in planetary rings Interplanetary dust can be found between planets, and is seen as gegenschein and zodiacal light.