The terms primary/foreign are just used to describe what the columns do - they aren't actual features of the database.
In most cases every table has a primary key. This is the key used to refer to each row in the table. In order to create a relationship between two tables you insert the primary key of one table into a column of another. In doing this you create what's known as a foreign key in the second table.
Perhaps showing how you would insert data into MySQL might clear this up
$q = "
INSERT INTO Member
VALUES (
null,
'Some data'
)
";
mysql_query( $q );
$member_primary_key = mysql_insert_id();
$q = "
INSERT INTO User
VALUES (
null,
'" . $member_primary_key . "',
'Some more data'
)
";
mysql_query( $q );
Here we first insert a record into the Member table. The first value is null because we've specified that column as the primary key, and it will auto increment. The second value is just some data.
Next we get the primary key value of the Member insert using mysql_insert_id()
Then we insert a record into the User table. Again the first value is null as it's the primary key. The second value is the one obtained by mysql_insert_id(). This is the foreign key as far as table User is concerned, Then we add some data.
Edit: I was somewhat wrong as primary keys are most definitely a database feature. Foreign keys refer to primary keys in other tables and are an abstract.