The tuning pegs on your instrument may either be too hard to turn or may not stay in place after you have tuned your strings. In most cases, these problems may be corrected by unwinding the string from the peg, removing the peg from the instrument, and applying a little inexpensive peg compound to the surfaces that contact the peg box. Replace the peg on the instrument, move it back and forth to test how well it turns, and then rewind the string onto the peg.
If peg compound does not solve your problem, a poorly fitting peg or uneven wear in a peg box hole may be causing the difficulty. These problems may require replacement of pegs or rebushing the peg box holes. You will need to consult a qualified luthier to diagnose and correct these problems. Never attempt to force a peg that is severely stuck and won't move. Rather than risk damaging your instrument, take it to a violin shop, and ask a technician to fix the problem.