From the Super Mario Wiki
Super Mario series
The player will always need to collect 100 Purple Coins to make a Power Star appear. Purple Coin Missions sometimes have a time limit. When there is a time limit, the Purple Coins are usually either set along a linear path, or over a hundred will appear and only one hundred of them will need to be collected. Additionally, once the Power Star appears, the player must collect it before the remaining time runs out.
In missions that aren't timed, the Purple Coins will be spread out across the level, requiring the player to explore every area in order to find them all.
All of the timed Purple Coin Galaxies have a theme that is a remix of Gusty Garden Galaxy's theme. The Battlerock and the Dreadnought Galaxy have the same theme, but they do not have time limits. Instead, the Purple Coins appear in a linear path while Mario stands on a moving platform. But the moving platform won't go back if the player misses any of them.
Also, unlike the standard Yellow Coins, Purple Coins will not restore any of the player's health, nor refill the air gauge while underwater.
Purple Coins re-appear in Super Mario Galaxy 2. They still appear in Comet missions, however a small change has been made: the timer will stop once the requirements are met. In the Rolling Coaster Galaxy, a Purple Coin will be in a ball, replacing the Star Ball. This is called a Purple Coin Ball. In this game, Player 2 can collect Purple Coins for Player 1 along with Yellow Coins.
Super Mario Galaxy Trading Card Description
Purple Coins are special coins that only appear when a Purple Comet is in orbit of a galaxy. Mario must travel to each of these galaxies, collecting 100 purple coins in each one in order to reveal the Power Star that is hidden there.