The primary function of Purkinje cells is to act as the principal neurons in the cerebellar cortex. They receive excitatory input from climbing fibers and parallel fibers and provide inhibitory output to the deep cerebellar nuclei. This modulation of neural signals is essential for fine-tuning motor activities and ensuring smooth, coordinated movements.