People often use the terms interchangably, but there is a subtle difference
Reproduced by
https://en.wikipedia.org/wiki/Compound_key "In database design, a compound key is a set of superkeys that is not minimal.
A composite key is a set that contains a compound key and at least one attribute that is not a superkey."
And a simple example may assist here:
Let's I have car ownership, my primary key might be:
PERSON_ID
CAR_ID
Notice that each of these is a key in its own right (to persons and cars). So it's a compound key. But if I started handling multiple ownership of the same car by the same person, the key might be:
PERSON_ID
CAR_ID
START_OF_OWNERSHIP_DATE
This is now a set of attributes used to uniquely identify the row (ie, START_OF_OWNERSHIP_DATE is not a key to anything), so its a composite key