Although this could seem clear in the Middel-Ages, it is not so today. The first Series of Essays on this website is devoted to this problem.
When we read the texts, or think about what they have to say, we must somehow visualize for ourselves this Substance-Accident Scheme in more or less acceptable terms, acceptable with respect to modern insights. The kernel of this visualization is worked out on this website and will be recalled by means of the following succint formula :
Every individual living or non-living being is considered to be the product of some dynamical system. The dynamical law of that system is the Essence of that being.
In Medieval times a sharp distinction was believed to exist between Substance and (its) Accidents. But although some accidents, like the WHERE and WHEN of a subject, are indeed clearly extrinsic to the subject, others are not. Those others -- the intrinsic determinations (intrinsic accidents) -- reflect something of that subject. Within the intrinsic determinations we can distinguish between per accidens determinations and per se determinations. Per se determinations are all the features that are connected with the stadia of the being (the thing) in question, i.e. the states of that being, the succession of which is dictated by the dynamical law. With this succession of states all kinds of determinations come and go, but they do so in a regular, lawful (i.e. not accidental) way : The thing (the being) passes through a definite series of states according to the dynamical law.
Per accidens determinations are effects, present in the thing, but caused by external agents, like the tanning of Socrates. Both the per se, and the per accidens determinations have content. They must belong to the (their) substance in some way. We should interpret substance as the Totality-of-all-intrinsic-determinations. Because this Totality is the product of the dynamical system, we consider it to belong to the "phenotypic" domain of being (where being is manifested), while we consider the (abstract) dynamical law as belonging to the "genotypic" domain of being.
Let us suppose that the Totality-of-intrinsic-determinations is a collection of the determinations A, B, C, D, E, F, etc. Something is not a substance S until it contains a complete set, consisting of all the TYPES of intrinsic determinations (and also extrinsic determinations). Now when we say that a certain (intrinsic) determination D is a determination of S (i.e. of substance S), then this should mean that D is a determination of that something containing A + B + C + D + E + F + ... . In the same way B is a determination of that something containing A + B + C + D + E + F + ... . "That something" thus contains the determination (that was predicated of "that something") and moreover contains the dynamical law (the Essence) and the ultimate substrate, prime matter. We can equate the form (the forma partis) with the dynamical law, and the form s.l. (the forma totius) with the non-designated prime matter + the dynamical law. This forma totius as such is not yet manifested in the Real World. Not until the prime matter is designated will the form be manifested in the Real World as an existing individual, an individual substance. For this individuation to occur, quantity is needed, especially dimensive quantity.
A determination -- an "accident" -- as such cannot exist, i.e. it cannot exist on its own. It must have a substrate. This substrate is the Totality-of-determinations + the prime matter. Because prime matter is substrate in the highest degree, it can communicate this aspect to all that is received by it. Only a complete substance can exist on its own (where "on its own" here means : ontologically on its own, i.e. it is ontologically independent).
And this gives us a clue for the solution, be it preliminary, of another problem :
We think of items like Quantity, Quality, Matter, Form, Accident, etc. as the "fundamental building blocks" of reality, discovered and treated of in Philosophy. But isn't quite a different science, namely Quantummechanics, already dealing with these "fundamental building blocks of reality"? In a way it is. It treats of the smallest chunks of matter. And every macroscopic thing is somehow build up from these chunks. These chunks are items like electrons and all kinds of other subatomic particles. They behave in a wierd way, and cannot be considered as full-fledged things. Their reality-status is problematic. They do not seem to be fully real. But there is one feature we must nevertheless attribute to them : They are ontologically independent. And this feature lets them distinguish from the buildingblocks treated of in Philosophy. Items like matter (in the metaphysical sense), substrate, accident, essence, are ontologically dependent. Only Substance, when it is complete substance, is ontologically independent. But an electron nevertheless is not yet a substance, because of its weakened reality-status.