How did the Prophet (blessings and peace of Allah be upon him) earn his living?
Question

                I would like to know how the Prophet (blessings and peace of Allah be upon him) earned his living?
Praise be to Allah.
    The Prophet (blessings and peace of Allah be upon him) used 
    to eat from what he earned with his hands. When he was young, he worked as a 
    shepherd. It was narrated from Abu Hurayrah (may Allah be pleased with him) 
    that the Prophet (blessings and peace of Allah be upon him) said: “Allah 
    never sent any Prophet but he tended sheep.” His Companions said: Even you? 
    He said: “Yes. I used to tend them in return for qaraareet for the people of 
    Makkah.”

    Narrated by al-Bukhaari, 2143.

    Qareeraat refers to part of a dinar or dirham. 

    Our Prophet Muhammad (blessings and peace of Allah be upon 
    him) also used to work in trade with his paternal uncle Abu Taalib and for 
    Khadeejah (may Allah be pleased with her), as is well known in the Seerah 
    (Prophet’s biography). 

    Then after that, Allah sufficed him with what He permitted to 
    him of the fay’ (spoils) and ghaneemah (booty), which is the noblest of 
    earnings. 

    Fay’ is that which is taken from the kuffaar without 
    fighting.

    Ghaneemah is that which is taken from the kuffaar by means of 
    fighting. 

    It was narrated that Ibn ‘Umar (may Allah be pleased with 
    him) said: The Messenger of Allah (sa) said: “I have been sent ahead of the 
    Hour with the sword, until Allah alone is worshipped with no partner or 
    associate, and my provision has been placed beneath the shade of my spear.”

    Narrated by Ahmad, 6/129; classed as saheeh by al-‘Iraaqi in
    Takhreej Ihya’ ‘Uloom ad-Deen, 2/352. Also classed as saheeh by 
    al-Albaani in Saheeh al-Jaami‘, 5142. 

    Al-Haafiz Ibn Hajar (may Allah have mercy on him) said: 

    This hadeeth points to the virtue of the spear (i.e., jihad) 
    and highlights that booty is permissible for this ummah and that the 
    provision of the Prophet (blessings and peace of Allah be upon him) was in 
    booty and not in other kinds of earning. Hence some of the scholars said 
    that it is the best kind of earning. End quote.

    Fath al-Baari, 6/98

    And Allah knows best.