The friction of the comb moving across hair creates static electricity. You can see it, although if you comb your hair in the dark, you might see some sparks. Static electricity can cause sparks. Sparks that can ignite flammable liquid, when the vapor of the liquid is such that it can be ignited. Almost any movement can create static electricity.
Liquid moving through a pipe or hose creates static electricity.
What is happening is the liquid is moving different electrons from one to another. When the conditions are right, you create static electricity by walking on a carpet. If you touch something, static electricity flows through your body and accumulates at the point you touch, which gives you a little tingle. Nothing serious, but a static electricity shock is enough to let you know you've been shocked. We don't necessarily say you can prevent it, but you can reduce the effects of static electricity by using a ground.