The function of a pencil sharpener is to make dull pencils sharp, so that one can use it to write. Many people now use mechanical pencils, which may make pencil sharpeners obsolete.
A rather tricky question. We all know what a pencil sharpener, but when but when we try to describe the function of pencil sharpener beyond the three word description "to sharpen pencils", we need to be clear about three aspects of sharpening pencil - type of pencil, meaning of sharpening, and method of sharpening.
There are two broad type of pencils. One are the traditional pencils in which the lead of the pencil is permanently embedded in an outer layer of wood or some similar material. The other type of pencil is the mechanical or clutch pencil, in which the lead slides within a separate outer covering. The pencil sharpeners are used primarily for traditional pencils. Although it is interesting to note that sometimes, mechanical pencils with thicker leads also have small sharpener to sharpen just the lead.
A pencil not only sharpens the pencil lead, it also removes the layer material covering the lead, a small length at a time, to expose just a small part of the lead required for writing. It also sharpens the lead. The main purpose of sharpener is to remove the outer covering on the lead.
A pencil may be sharpened also by a pencil knife or some other sharp knife. Such tools do not qualify as pencil sharpener. A pencil sharpener, sharpens the pencil in a specific way. The pencil is rotated in relation to and in contact with cutting edge of the sharpener located in in such a way that the cutting edge shaves off material from one end of the pencil to form a conical shape. The apex of the cone thus formed is the sharpened end of the lead, surrounded by the outer covering towards base of the cone.
To answer in a more descriptive way, apencil sharpener uses a piece of steel that is curved along the ridges in order to sharpen the end of a pencil.
The electric motor kicks in when a pencil (or a small enough object) is pressed into the hole, sharpening the pencil down until the grooves cannot sharpen it anymore. Thus, a pencil sharpener sharpens pencils.