Yes, they DO have to orbit a star. ‘According to current definitions, all planets must revolve around stars; thus, any potential"rogue planets" are excluded.’ Quote from Wikipedia: Planet. The International Astronomical Union is the authority on naming astronomical objects. And according to their definition, a planet MUST be orbiting the Sun. read more
Others have answered very well so I will just add a little tidbit. Stars orbit planets. Yes you read that correctly, Stars orbit planets. They just don't do so noticeably. All objects with mass exhibit a gravitational pull. So while a star attracts a planet, the planet is also attracting the star. read more
Studies of exoplanets have shown us, through both the transit method and the stellar wobble method, that not only do most (if not all) stars likely have planets around them, most of them likely have worlds with a variety of masses, sizes, and orbital periods around them. read more