It’s unfortunate that there is an overlap between the way that we talk about the “stuff” of which things are made (namely, “matter”) and the “matter” which, when it receives a form, becomes something real. It generates confusion. Ed Feser provides a useful explanation for the beginning Thomist or Aristotelian (or for the man who simply wishes to understand A-T thought) in his book Aquinas. It’s helpful to distinguish the two by naming the latter (the “matter” that receives a form) prime matter. Unlike the “stuff” of which things are made, which comes down in the end to molecules and atoms, prime matter does not actually exist independently of a form. It is pure potentiality. This potentiality must be distinguished from what is in act, or actual: potentiality stops being merely potential when it becomes actual. Cold water, for example, ceases to have the potentiality for being hot when it is actually hot. The potentiality is gone, replaced by actuality. See page 14 of the book. What scientists mean by “matter” and what A-T philosophers mean by it overlap a little (at least, they overlap when prime matter receives some substantial form), but for the most part they differ. So the new reader of Aquinas or Aristotle needs to be be careful not to import his notions of matter from science (or from Star Trek).
And speaking of overlap, this post overlaps a lot with this other one.