a primary key is a unique identifier.
Thus you can reference a whole row if you know what is it s specific id.
This id may be used in another table (being then a foreign key) to associated a row with a row from another table.
Lets imagine a table:
USERS
id (primary key)
user (name)
mail (email)
1 hendrix gipsy@heaven.org
2 bilbo bilbo@shire.net
3 bruce lee bruce@lee.com
INTEREST
And another one:
id primary key
name
1 music
2 genealogy
3 pot
4 sport
You will be able to associate some interest
with some users by another table that will use 2 foreign key (one pointing to users, the other to interets):
1 id
2 user_id
3 interest_id
1 1 1
2 1 3
3 2 2
4 2 2
5 3 4
Thus you will be able (if needed) to make some sentence that will give you the email of every people interesyed in say sport, or whatever.
About the max trouble, mysql documentation may help you:
manual.html#example-Maximum-column
SELECT MAX(id) AS id FROM USERS
Another way to handle the troubles of knowing the latest row inserted (beware of someone inserting a row at the same moment you do) would be to use mysql_insert_id function.