Flash floods happen when the amount of rain (or in winter melting snow) is too much for the soil to soak it in.
Soil is like a giant sponge. When rain falls on it, it soaks up most of the water in the tiny spaces between soil particles. This is the water that plant roots suck up to let plants grow. If the soil becomes nearly full of water, some of it soaks down and finally makes its way slowly to rivers.
But the gaps between particles of soil are small and there is a limit as to how much water can get in in a minute. So when you have a torrential thunderstorm in summer, or when warm air suddenly melts snow, the soil may not be able to soak up all of that water and there it just flows straight to streams.
Now, water running directly to streams gets there superfast, and when lots of water reaches a stream or river quickly that will be more than the stream or river can take, so it, too, fills up and then spills over the banks, causing a flood.
These floods can rise up within a few minutes, which is why they are called flash floods. They regularly drown people each year. The sign tells you to get out of a valley when a thunderstorm is around. Campers are especially at risk because they might be asleep when the flood hits. Camping by a mountain river in thunderstorm weather is not good news.