Aristotle discovered hylemorphism to reconcile the reality of change with the stability of being. Previously, the Parmenideans, on one hand, held that (a) nothing changes and that change is an illusion, but (b) that the principle of non-contradiction is true—in accordance with the Latinized dictum ex nihilo nihil fit ("out of nothing nothing can be [made]"), i.e., that being cannot come from non-being. On the other hand, the Heraclitians denied (a) the existence of stable beings, thinking everything changes, but (b) affirmed the multiplicity of beings against the monist Parmenideans.
St. Thomas Aquinas, in his opusculum (short work) De Principiis Naturæ (cf. Joseph Kenny, O.P.'s Philosophy of Nautre: Let Thomas Aquinas Teach It for a good introduction / background), states:
[T]hat which is in potency to substantial existence and that which is in potency to accidental existence can be called matter: for example sperm is the matter of man [since sperm is potentially the substance of a man] and man is the matter of whiteness [since man is potentially white].
[J]ust as everything which is in potency can be called matter, so also everything from which something has existence whether that existence be substantial or accidental, can be called form; for example man, since he is white in potency, becomes actually white through whiteness, and sperm, since it is man in potency, becomes actually man through the soul.
So, matter is to form as essence is to existence.
Cf. another opusculum by St. Thomas, his famous De Ente et Essentia (On Being and Essence). He discusses the higher order of essence and existence with respect to that of matter and form; to give a foretaste:
essence includes matter and form.
neither can it be said that essence signifies some relation between matter and form or something added to them, because this would of necessity be an accident or something extraneous to the real thing, and the real thing would not be known through it. And these are traits of essence. For through the form, which is the actuality of matter, matter becomes something actual and something individual. Whence what supervenes does not confer on matter actual existence simply, but such an actual existence; as accidents in fact do. Whiteness, for example, makes something actually white. Whence the acquisition of such a form is not called generation simply, but generation in a certain respect. It remains, therefore, that the word “essence” in composed substances signifies that which is composed of matter and form.
Since the real distinction between potentiality and actuality is a foundational thesis of Thomism (cf. Thesis #1 of the 24 Thomistic Theses), you'll find Thomists explaining formal vs. material causes very well: