how are they assigned? what do the codes mean?
They're randomly assigned and have no meaning except as the "address" for a particular profile. They're about as meaningful as the last four digits of your phone number.
The dont mean anything - nor do they need to
they are simply a unique identifier so that when you are discussing a specific person you can tell people EXACTLY which person you are referring to -- among the BILLIONS of people inside Family Tree
otherwise for example - if you were discussing a John Smith - how in the world would you communicate to others WHICH of the millions of John Smiths in the database you were referring to???
see this discussion:
The PIDs mean nothing. Which even less than the last 4 digits of many phone numbers.