Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
A very quick search using your question as the search term gave over 1.5 million hits:
Google : How to use Primary Key and Foreign Key in SQl[
^]
The first hit is W3Schools:
http://www.w3schools.com/sql/sql_foreignkey.asp[
^] with a good explanation and example.
In future, please try to do at least basic research yourself, and not waste your time or ours.