From the Super Mario Wiki
Stars (スターズ, Sutāzu) are enemies found in the second stage of the Space Zone of Super Mario Land: 6 Golden Coins. One also appears at the end of the secret level in the Space Zone. Stars are treated more like obstacles than enemies, and can be found in clusters forming an impassable impassable, and are sometimes found moving back and forth in space. Stars are the only enemy in the game that cannot be defeated, even with the help of a Super Star. Stars share the same artwork as Starmen from Super Mario Bros. and depict them as smiling, in contrast with their in-game frowning expressions.