There is two difference between them.
1. The not null constraint is by default added to primary key, it means, primary key attribute cannot accept null values, whereas, the attribute declared as unique can accept null values. It is the major difference between the two.
2. Secondly, we can have only one primary key in a relation, whereas, multiple attributes can be declared unique at the same time.