A flagellum is a whip-like appendage that is used for movement in certain types of organisms, particularly bacteria and some eukaryotic cells. It consists of a long, thin filament or hair-like structure that extends from the cell body and can be propelled by a motor protein to move the cell through its environment. In some cases, flagella are used for locomotion while in others they may play a role in sensing chemical signals or moving substances around the cell.