To keep violin pegs in good condition is to make tuning much easier and much smoother. The pegs should fit exactly and respond to the slightest touch.
If the pegs do not work easily, there are some peg compounds that can lubricate pegs that are stuck. In addition, Peg Drops can allow you to slip out pegs without entirely removing them from the violin.
If the pegs are still not work properly, take the violin to a violin shop to fix it.