When a star is born, any leftover gas and dust forms a disc around it, similar to Saturn's rings. Within this disc, small dust grains made of rock sometimes form. These grains can then collide and stick together, forming larger and larger objects — this is how planets are born.
Credit:
ALMA (ESO/NAOJ/NRAO)/L. Calçada (ESO)