Here, we are explaining a simpler way to each key :
Candidate keys are those keys which is candidate for primary key of a table. In simpler we can understand that such type of keys which full fill all the requirements of primary key which is not null and have unique records is a candidate for primary key. So thus type of key is known as candidate key. Every table must have at least one candidate key .
Such type of candidate keywhich is chosen as a primary keyfor table is known as primary key. Primary keys are used to identify tables.There is only one primary key per table.
Foreign key are those keys which is used to define relationship between two tables. When we want to implement relationship between two tables then we use concept of foreign key. It is also known as referential integrity.
If any table have more than one candidate key, then after choosing primary key from those candidate key, rest of candidate keys are known as an alternate key of that table.
When we create keys on more than one column then that key is known as composite key. I have a table Employee which has two columns Empid and EmpReferenceNo and we make primary key on these two column. Then this key is known as composite key: