It depends on the contest, I’m sure, and you can generally find the rules for the contests posted somewhere. From what I know of baking contests, you go and bake your dish. Then it is taste tested by a panel of judges. Based on that, points are awarded (and also based on how it looks, smells, etc.). Depending on the contest, you may be able to make your dish at home or you may be required to make it at the contest.