Well, it goes without saying that any planet is going to be orbiting some star or other. And the nomenclature was often quite specific. For example, the planet in "This Side of Paradise" is Omicron Ceti Three, meaning it's the third planet orbiting the fifteenth brightest star (omicron being the 15th letter of the Greek alphabet) in the constellation Cetus (the whale).
Not always. In "Enterprise" episode "Rogue Planet" they found a planet with no sun that somehow managed to support a complete ecosystem. There was no explanation for what the planet's source of heat was, and I don't think there is anything redeeming that episode scientifically.