How does a SIM card interface with a mobile phone?

Note: There are comments associated with this question. See the discussion page to add to the conversation.