they are formed by glaciers picking up stones and rubble and depositeing them over time where they melt. they change over time by the action of wind,rain and ice
the difference between them is that the formation is different and a terminal moraine comes at the end of a glacier and the recesstional moraine comes at the begining.