There are three distinct ways in which glaciers shape the land:
1) erosion
2) transportation and
3) deposition.
Erosion picks up material through weathering plucking and abrasion.
That material is then transported because it moves downhill. Sometimes the fabric is hidden inside or at the base of the glacier, or sometimes it's on top of the glacier, accounting for the dirty color of some glaciers.
Those rocks and other transported materials eventually get deposited in a replacement place as the glacier melts; this leftover material is called glacial till, and it's what forms many of our landscapes today from the last ice age.