The Bokeh Filter - How it Works
The aperture of a camera lens is made up of several blades that overlap each other, called a diaphragm. These blades combine to form a hole in the center of the lens. This hole allows light to pass through it and onto the camera film or image sensor. The larger the aperture, the larger the hole letting in light becomes. When a picture is taken with a lens using a large aperture, the background of the photo will become blurred (this blurred area is referred to as bokeh). Light sources in blurred backgrounds will take the shape of the aperture hole in the center of the diaphragm. This shape is usually fairly close to a circular shape.
When a shape that is smaller than the aperture size is placed over the lens, this blocks out certain portions of light from entering through the aperture. The result is that the bokeh in an image will take the shape of whatever light is let through the aperture. If a star is placed over the lens, all light outside of the star will be blocked out and blurred light sources will become stars intead of circles. If using the proper aperture, this process only affects the background elements of a photo and not the foreground.