You can collect three Star Coins in each level. What is their purpose?
Collecting all three star coins on every level in a particular world opens up a corresponding secret level in the correspondingly secret World 9. For example, if you get them all in world 3, you unlock world 9-3
You need to collect every star coin from all nine worlds to achieve the second and third of the five save file stars, which indicate how much of the game you have completed.
You can also use them to buy videos like "super skills" Or "Star coin".