Every level has the goal of clearing all the cards from the board. However, starting at Level 26, levels will also have a secondary Bonus Goal. The Bonus Goal is shown in the upper right corner of each level. Completing a level's Bonus Goal will earn you 40 coins.

You must achieve the Bonus Goal (as well as collecting all three stars) in order to "gold plate" the level.

There are many different types of Bonus Goals. You can see the Bonus Goal before entering the level, on the pre-level pop-up as shown below.

Bonus Goal on Pre-Level Pop-Up