primary key: a (normally numeric and auto_increment) column used to identify exactly one row of the table
foreign key: used for relations, it's another tables' primary key
example:
table user
user_id | username | usermal
table posts
post_id | user_id | topic | content
post_id and user_id are primary keys since they canbe used to identify one specific topic or user exactly
tu know which user created a topic the user_id is used as a foreign key in table posts
got it?