It’s all about how you push into the pegs while you are turning them. Think of this process like having a nail, and you are trying to put that nail into a piece of 2×4 wood. You couldn’t (manually) put that nail in unless you twisted while pushing. That concept is the same with pushing pegs into the peg box–twisting is just as important as turning. If you do it properly, you can actually make the peg so tight that it is hard to turn.
I would suggest watching our Beginner violin lesson 3 which covers some concepts related to tuning/peg turning.