Whenever possible have both hands free. Carry any needed tools in a waist or shoulder bag, or hoist or lower the tools with a line tied to a tool bag or bucket. Hold the rungs rather than the rails, this will give you better support and control if your foot slips. Grasp the rungs in a hand over hand manner.

Three Point Rule -

If you can’t have both of your hands free - always have 2 feet and one hand or 2 hands and one foot on the ladder at all times, even when working.