To study cerebellar activity during learning, we made whole-cell recordings from larval zebrafish Purkinje cells while monitoring fictive swimming during associative conditioning. Fish learned to swim in response to visual stimulation preceding tactile stimulation of the tail. Learning was abolished by cerebellar ablation. All Purkinje cells showed task-related activity. Based on how many complex spikes emerged during learned swimming, they were classified as multiple, single, or zero complex spike (MCS, SCS, ZCS) cells. With learning, MCS and ZCS cells developed increased climbing fiber (MCS) or parallel fiber (ZCS) input during visual stimulation; SCS cells fired complex spikes associated with learned swimming episodes. The categories correlated with location. Optogenetically suppressing simple spikes only during visual stimulation demonstrated that simple spikes are required for acquisition and early stages of expression of learned responses, but not their maintenance, consistent with a transient, instructive role for simple spikes during cerebellar learning in larval zebrafish.