Aristotle defines X's matter as "that out of which" X is made. For example, letters are the matter of syllables. Thus, "matter" is a relative term: an object counts as matter relative to something else. For example, clay is matter relative to a brick because a brick is made of clay, whereas bricks are matter relative to a brick house.
Change is analyzed as a material transformation: matter is what undergoes a change of form. For example, consider a lump of bronze that's shaped into a statue. Bronze is the matter, and this matter loses one form (that of a lump) and gains a new form (that of a statue).
According to Aristotle's theory of perception, we perceive an object by receiving its form with our sense organs. Thus, forms include complex qualia such as colors, textures, and flavors, not just shapes.
Medieval philosophers who used Aristotelian concepts frequently distinguished between substantial forms and accidental forms. A substance necessarily possesses at least one substantial form. It may also possess a variety of accidental forms. For Aristotle, a "substance" (ousia) is an individual thing—for example, an individual man or an individual horse. The substantial form of substance S consists of S's essential properties, the properties that S's matter needs in order to be the kind of substance that S is. In contrast, S's accidental forms are S's non-essential properties, properties that S can lose or gain without changing into a different kind of substance.
In some cases, a substance's matter will itself be a substance. If substance A is made out of substance B, then substance B is the matter of substance A. However, what is the matter of a substance that is not made out of any other substance? According to Aristotelians, such a substance has only "prime matter" as its matter. Prime matter is matter with no substantial form of its own. Thus, it can change into various kinds of substances without remaining any kind of substance all the time.