The difference between primary key and composite key is as follows:-
The primary key is used to uniquely identify the column of the table whose every row data is unique. In the table every row must have a primary key and no two rows can have the same primary key. The values of the primary key can never be null nor can be modified or updated.
When a set of columns will uniquely identify every row in the table it is called as Composite Key is which is a form of the candidate key.