Handwriting is something that takes children a while to master.
It is a skill to coordinate a pen/pencil in a controlled manner to produce an exact result and one that develops over time and experience.
To develop good handwriting, you require good fine-motor skills, hand/finger muscle strength and a good pen-grip/hold.
Being a trained teacher, since my children started holding and drawing with writing tools (pens, pencils, markers, crayons, paintbrushes), I have been encouraging them to adjust their grip to hold their writing implements with the three correct fingers that allow for good handwriting down the track.
Many children don't practice holding a pen using the correct 3 fingers until they get to school and then it's often a matter of trying to correct the natural hold that they have developed.
Whilst children (and adults) are able to write using other various holds, the time-tested method below, once mastered, is the most comfortable way to write, allows for ease of movement and is the least likely to cause muscle strain or discomfort, especially when writing for lengthy periods of time.