Artist's impression of a rogue planet
Rogue planet is a planet that is not gravitationally bound to any star or brown dwarf. Rogue planets can form around stars and later get ejected, or they can form on their own the same way as stars or brown dwarves, if they end up being even less massive than 13 Jupiter masses. If a rogue planet is more massive than Jupiter its classified as a sub-brown dwarf, and this is kind of controversial.
The Milky Way Galaxy can have trillions of rogue planets. However, the chance that one is going to enter our Solar System and even more pose a threat to Earth in the nearby future is basically zero.