Getting a set of spare strings to put in the violin case is a good idea.
To change the strings (See Fig. 6):
1. Carefully take the broken string out.
2. Unroll the new string, making it straight.
3. The tip of the string (the side without the ball) goes through the hole of the peg.
4. Wind the string around the peg, starting from the center, going to the right edge, for the A and E strings.
5. For the D and G strings, wind the string around the peg from the center to the left edge.