A long hairlike or whiplike contractile filament protruding from certain bacterial cells and spores of fungi and that enable movement.