Unlike flashing lights or reflective triangles, the white cloth is not mentioned in any driver's manual or traffic laws. It is a custom that spread among drivers as an improvised way to communicate an emergency while the vehicle is moving or stopped on the side of the road.
The choice of color is not accidental: white is historically associated with truce, peace, and a plea for help. That's why, upon seeing it waving from a window, many drivers interpret it as a sign that something is wrong inside the car and pay closer attention.
Common situations in which it is used: