The Goal is the final part of almost every level. To win the level, Mario must break the bar in the goal. Mini Stars will also be awarded for breaking the bar. The higher the bar when broken, the more stars get earned.
Also, by carrying different objects to the end of the goal, they'll transform into different objects.