A straw is a dried stem of grass. It will float on the surface of water. So the literal meaning is that a drowning man would attempt to grab a straw as if it were something substantial like a log, something large enough to help him to get to the surface. The figurative meaning is that when people are desperate they will try anything, no matter how wildly unlikely their action is to be successful.
Interested in Language