A flagella is like a long tail that protrudes off of the bacteria body that propels the bacteria forward. It can be thought of like the tail of a tadpole that pushes the tadpole forward in water.
Bacteria most often live in liquid and need a way to propel themselves around in their environment. One such way for bacteria to move in liquid is through the use of a flagella. The tail pushes the bacteria forward in a swimming motion like a tail fin, and it can also push off of other cells and grab onto surfaces to pull the bacteria.