The details of the two different mechanisms are specified in the MIME standards and generally are hidden from users of email software.
Where are the details of the two mechanisms for email transmission specified? 
MIME standards