Cold water is a killer, literally. Because water sucks the heat out of a human body much faster than air does, a body in 40 degree water cools down very quickly. As this piece in the Scientific American explains, 40 degree water gives a person about 15 minutes before blood moves desperately to the core (and vital organs) and away from arms and legs, which become very weak and lose coordination.
If you do fall into freezing water, the piece advises, try to find a flotation device. Get as much of your body out of the water as is possible, and try to curl up in a ball, to keep your limbs closer to your core.
If you get out of the water and your body temperature is above 95 degrees, a blanket may be sufficient to warm you up. If your body temperature is lower than 95 degrees, medical treatment is probably needed.
Read more about that treatment in the Scientific American.