metadata and metastrings table

I wonder how metadata and metastrings table can be used. After I read the elgg document page, I still don't understand.  Now from the same page, I know metadata.name_id and metadata.value_id are supposed to link to matastrings table.  But I don't understand how are they linked.  Can anyone please give me an example? Please help. Thanks.