A planet is a large object that orbits a sun.  Most suns have all sizes of objects orbiting them, from huge planets to specks of dust.  If the diameter is greater than 930 kilometres, the Federation calls it a planet, and gives it a code.  An asteroid is smaller, and a moon orbits a planet.