The festival takes place on the beach between 10am and 6pm on the 21st of Fall. On the 20th, Rick will come to your farmhouse in the morning to ask what sheep you'd like to enter. If you own a sheep and want to enter, choose one and Rick will take it for the festival on the following day. Rick will not take a baby sheep, sick or pregnant sheep. Additionally, your sheep must have all of its wool and cannot be sheared. If you do not own an adult sheep (or don't wish to enter), Rick will still encourage you to come watch the festival.
On the 21st, go to the beach and talk to Rick to start the judging of the contest. Your sheep will be up against three other contestants. The higher the heart level your sheep has, the better your chance of winning. A sheep at 9-10 hearts will almost be guaranteed to win (although 9 hearts may still get you second place). Any placing besides first place counts as a loss. Nothing will happen if you lose.
If your sheep places first, it's level will increase.