Water flowing in a stream erodes through abrasion, saltation, traction of material along the river bed etc, cutting down into the ground mostly just below it, creating a V shaped valley.
Ice in glaciers scours its way through the rock material beanth it. Because of this bulldozer kind of effect, it creates a U shaped valley.