The roll of the dice is all up to chance, but winning Yahtzee doesn't have to be. There is some strategy you can apply to the game.
There are two main strategic angles: Get the highest number of points available, and get enough points in the upper level to score a bonus.
The score card is divided into two sections. The upper level consists of the single-number slots, Ones through Sixes. There's a 35-point bonus if the total of all points in that level is 63 or greater, which is something to keep in mind when deciding which slot to fill with a roll that applies in more than one place. For instance, if you roll three 2's and two 6's, you might automatically apply that to your Full House (25 points) instead of your Sixes (12 points). But, if 12 points will get you to the 63-point mark in the upper section, the 35-point bonus is even better than the 25-point Full House.
There's also the more obvious, overarching strategy of filling up the most valuable slots early so if you end up having to take any zeroes at the end of the game, you're out fewer points. This basically means that if, at the beginning of the game, you roll three 5's, a 6 and a 2, put 23 in the Three of a Kind box instead of 15 in the Fives box.
One more strategy tip: Go for the Yahtzee! Your first Yahtzee is worth 50 points, and any additional Yahtzee is worth 100. You can win a game on that second Yahtzee alone. So by all means, if you roll five 6's and each slot is filled except for Sixes, ignore the open slot and call it a Yahtzee.