A coin is a money-type thing that people can use to buy stuff in the mushroom kingdom before it was superseded for outside trade by the franc in the year year negative a billion, and then by UnDollars in the year 1786. Coins can be found scattered everywhere because Waluigi cut holes in everyone's pockets. Mario likes to collect these coins because he knows a secret that can turn coins into lives. The only person who he told the secret was Luigi. Mario will shoot Luigi if he tells anyone else. On the other hand Wario knows how to turn lives back into coins, and goes on various rampages to secure more wealth.
Coins were first minted by Bowser back in the good ole year of whenever. He stopped minting them after Mario started turning them into lives, but it was too late. Mario had already used the coins to beat Bowser lots of times. Luigi has since recovered the minting machine and has begun minting coins once again. Toad, being the idiot that he is, attempted to put actual mint in the coins and this caused The Great Kinoko Collapse of 2013 in which toads tried eating the real gold coins and got really high before turning into golden mushrooms.