The Milky Way is home to 200 billion free-floating planets that do not orbit a star. Many were tossed from a star system: flung for having the wrong trajectory to fit in.
Planets can come together on their own, rather than synthesizing from the leftovers of a star on the make. Small round clouds shear from the dusty pillars of gas sculpted by young stars. These balls of debris are pushed from the center of a nebula by radiative pressure from the hot stars there. So sped on their way, such clouds develop the spin to coalesce into planetary free floaters that never catch fire, nor become attached to a star system. Their hardscrabble upbringing means that freeborn planets invariably are compact, with dense cores.
Brown dwarfs, sometimes called failed stars, are bodies with a mass between that of planets and stars. Akin in outcast status, they are big brothers to the rogue rocks that roam the cosmos without a star to call their own.