See that U-shaped valley? That’s Lairig Ghru. It was carved out by a glacier, a huge river of ice, during the ice age - just like corries and other glacial features. As glaciers move downhill ...
The different types of moraine include terminal moraine, which marks the end of an ice sheet or valley glacier, and lateral moraine, which forms at the edge of a glacier at the valley side.