What is the function of the flagella?
It serves as a "limb" to move different types of cells arround.
Many kinds of cells need to move themselves arround. There are some ways to achieve this, the most common of them is by using organelles such as the flagella, which looks like a thin tail and is composed by proteins. The flagella whirls arround in high speed, propelling the cell in a way similar to a boat's motor. Among the cells that use flagella are many bacteria, protozoans and the human spermatozoid.
Check this representation of a bacteria and its flagellum: