As a glacier slowly moves downhill, it grinds up and transports large amounts of soil and rocks. As the glacier melts and recedes, the rocks and soil fall out and form ridge-like deposits called moraines. The deposit at the glacier's furthest point of advance is called a terminal moraine.
http://en.wikipedia.org/wiki/Moraine