A process that is carried out at the cellular level which results in the assembly, arrangement of constituent parts, or disassembly of a bacterial-type flagellum, a motor complex composed of an extracellular helical protein filament coupled to a rotary motor embedded in the cell envelope which functions in cell motility.