Custom would be a value from an external system such as Record ID from a Content Management System as Drupal.
Marketo Id takes precedence over all other keys. If both ForeignSysPersonId and the Marketo Id are present in the lead record, then the Marketo Id will take precedence and the ForeignSysPersonId will be updated for that lead. If the only ForeignSysPersonId is given, then it will be used as a unique identifier.
At present, ForeignSysID is never returned in getLead or getMultipleLeads operations, so you cannot read this value through the API
You can set those ForeignSys field values with syncLead/syncMultipleLeads and then reference leads with that stored ForeignSysID.