Prophet Muhammad(PBUH) was the prophet of Islam religion per revelation of Quran to him that reflects real God (Allah in Arabic) words revelation to him through the Angel Gabriel (Jibril). He was born in Mecca (or Makkah) in the Kingdom of Saudi Arabia (KSA) in year 570 AD. He started receiving Quran God revelation in year 610 AD through the year 632 AD (year of his death).
Prophet Muhammad (PBUH) was in charge of:
Announcing and conveying the Quran message
Teaching people and guiding them to the right path
Promising the believers and monotheists with good God rewards and warning the atheists and polytheists.
Serving as a real human model for the good morals and ethics that anyone should follow in his life
Being witness
As detailed below:
Announcing and conveying the Quran message, real words of God (Allah in Arabic), to the people of the world. These God words were revealed by God to prophet Muhammad through the Angel Gabriel (Jibril); started in year 610 AD through year 632 AD (year of prophet Muhammad death).
Quran says:
۞ يَا أَيُّهَا الرَّسُولُ بَلِّغْ مَا أُنزِلَ إِلَيْكَ مِن رَّبِّكَ ۖ وَإِن لَّمْ تَفْعَلْ فَمَا بَلَّغْتَ رِسَالَتَهُ ۚ وَاللَّـهُ يَعْصِمُكَ مِنَ النَّاسِ ۗ إِنَّ اللَّـهَ لَا يَهْدِي الْقَوْمَ الْكَافِرِينَ ﴿٦٧﴾
Meaning English translation:
{ O Messenger, announce that which has been revealed to you from your Lord, and if you do not, then you have not conveyed His message. And Allah will protect you from the people. Indeed, Allah does not guide the disbelieving people. (67)}
[Quran, chapter 5, verse 67]
and says
كَذَٰلِكَ أَرْسَلْنَاكَ فِي أُمَّةٍ قَدْ خَلَتْ مِن قَبْلِهَا أُمَمٌ لِّتَتْلُوَ عَلَيْهِمُ الَّذِي أَوْحَيْنَا إِلَيْكَ وَهُمْ يَكْفُرُونَ بِالرَّحْمَـٰنِ ۚ قُلْ هُوَ رَبِّي لَا إِلَـٰهَ إِلَّا هُوَ عَلَيْهِ تَوَكَّلْتُ وَإِلَيْهِ مَتَابِ ﴿٣٠﴾ {We have sent you to a nation before whom there lived many nations so that you would read to them what We have revealed to you. They still deny the existence of the Beneficent God. Say, "He is my Lord besides whom there is no other God. I trust Him and turn to Him in repentance." (30)} [Quran, chapter 13, verse 30]
and says:
إِنَّ فِي هَـٰذَا لَبَلَاغًا لِّقَوْمٍ عَابِدِينَ ﴿١٠٦﴾ وَمَا أَرْسَلْنَاكَ إِلَّا رَحْمَةً لِّلْعَالَمِينَ ﴿١٠٧﴾ قُلْ إِنَّمَا يُوحَىٰ إِلَيَّ أَنَّمَا إِلَـٰهُكُمْ إِلَـٰهٌ وَاحِدٌ ۖ فَهَلْ أَنتُم مُّسْلِمُونَ ﴿١٠٨﴾ فَإِن تَوَلَّوْا فَقُلْ آذَنتُكُمْ عَلَىٰ سَوَاءٍ ۖ وَإِنْ أَدْرِي أَقَرِيبٌ أَم بَعِيدٌ مَّا تُوعَدُونَ ﴿١٠٩﴾
{ Indeed, in this [Qur'an] is notification for a worshiping people. (106) And We have not sent you, [O Muhammad], except as a mercy to the worlds. (107) Say, "It is only revealed to me that your god is but one God; so will you be Muslims [in submission to Him]?" (108) But if they turn away, then say, "I have announced to [all of] you equally. And I know not whether near or far is that which you are promised. (109)}
[Quran, chapter 21, verses 106-109]
and says:
مَّن يُطِعِ الرَّسُولَ فَقَدْ أَطَاعَ اللَّـهَ ۖ وَمَن تَوَلَّىٰ فَمَا أَرْسَلْنَاكَ عَلَيْهِمْ حَفِيظًا ﴿٨٠﴾
{He who obeys the Messenger has obeyed Allah; but those who turn away - We have not sent you over them as a guardian. (80)}
[Quran, chapter 4, verse 80]
Teaching people and guiding them to the right path
Quran says:
لَقَدْ مَنَّ اللَّـهُ عَلَى الْمُؤْمِنِينَ إِذْ بَعَثَ فِيهِمْ رَسُولًا مِّنْ أَنفُسِهِمْ يَتْلُو عَلَيْهِمْ آيَاتِهِ وَيُزَكِّيهِمْ وَيُعَلِّمُهُمُ الْكِتَابَ وَالْحِكْمَةَ وَإِن كَانُوا مِن قَبْلُ لَفِي ضَلَالٍ مُّبِينٍ ﴿١٦٤﴾
Meaning English translation:
{Certainly did Allah confer [great] favor upon the believers when He sent among them a Messenger from themselves, reciting to them His verses and purifying them and teaching them the Book and wisdom, although they had been before in manifest error. (164)}
[Quran, chapter 3, verse 164]
Promising the believers and monotheists with good God rewards and warning the atheists and polytheists.
Quran says:
وَبِالْحَقِّ أَنزَلْنَاهُ وَبِالْحَقِّ نَزَلَ ۗ وَمَا أَرْسَلْنَاكَ إِلَّا مُبَشِّرًا وَنَذِيرًا ﴿١٠٥﴾
Meaning English translation:
{ And with the truth We have sent the Qur'an down, and with the truth it has descended. And We have not sent you, [O Muhammad], except as a bringer of good tidings and a warner. (105) }
[Quran, chapter 17, verse 105]
and says:
وَمَا أَرْسَلْنَاكَ إِلَّا كَافَّةً لِّلنَّاسِ بَشِيرًا وَنَذِيرًا وَلَـٰكِنَّ أَكْثَرَ النَّاسِ لَا يَعْلَمُونَ ﴿٢٨﴾
{And We have not sent you except comprehensively to mankind as a bringer of good tidings and a warner. But most of the people do not know. (28)}
[Quran, chapter 34, verse 28]
Serving as a real human model for the good morals and ethics that anyone should follow in his life. You find in prophet Muhammad (PBUH) the models for the boy, the orphan, the poor, the rich, the merchant, the buyer, the seller, the borrower, the warrior, the peace seeker, the brother, the companion, the traveler, the worshiper, the husband, the father, the grand father, the state man, the judge, the leader, the ruler, ....
Quran says:
لَقَدْ جَاءَكُمْ رَسُولٌ مِّنْ أَنفُسِكُمْ عَزِيزٌ عَلَيْهِ مَا عَنِتُّمْ حَرِيصٌ عَلَيْكُم بِالْمُؤْمِنِينَ رَءُوفٌ رَّحِيمٌ ﴿١٢٨﴾
Meaning English translation:
{A Messenger from your own people has come to you. Your destruction and suffering is extremely grievous to him. He really cares about you and is very compassionate and merciful to the believers. (128)} [Quran, chapter 9, verse 128]
and says:
مَا أَنتَ بِنِعْمَةِ رَبِّكَ بِمَجْنُونٍ ﴿٢﴾ وَإِنَّ لَكَ لَأَجْرًا غَيْرَ مَمْنُونٍ ﴿٣﴾ وَإِنَّكَ لَعَلَىٰ خُلُقٍ عَظِيمٍ ﴿٤﴾
{ (Muhammad), you are not insane, thanks to the bounty of your Lord. (2) You will certainly receive a never-ending reward. (3) You have attained a high moral standard. (4)} [Quran, chapter 68, verses 2-4]
As witness:
Quran says:
فَكَيْفَ إِذَا جِئْنَا مِن كُلِّ أُمَّةٍ بِشَهِيدٍ وَجِئْنَا بِكَ عَلَىٰ هَـٰؤُلَاءِ شَهِيدًا ﴿٤١﴾
Meaning English translation:
{ So how [will it be] when We bring from every nation a witness and we bring you, [O Muhammad] against these [people] as a witness? (41) }
[Quran, chapter 4, verse 41]
and says:
وَيَوْمَ نَبْعَثُ فِي كُلِّ أُمَّةٍ شَهِيدًا عَلَيْهِم مِّنْ أَنفُسِهِمْ ۖ وَجِئْنَا بِكَ شَهِيدًا عَلَىٰ هَـٰؤُلَاءِ ۚ وَنَزَّلْنَا عَلَيْكَ الْكِتَابَ تِبْيَانًا لِّكُلِّ شَيْءٍ وَهُدًى وَرَحْمَةً وَبُشْرَىٰ لِلْمُسْلِمِينَ ﴿٨٩﴾ ۞ إِنَّ اللَّـهَ يَأْمُرُ بِالْعَدْلِ وَالْإِحْسَانِ وَإِيتَاءِ ذِي الْقُرْبَىٰ وَيَنْهَىٰ عَنِ الْفَحْشَاءِ وَالْمُنكَرِ وَالْبَغْيِ ۚ يَعِظُكُمْ لَعَلَّكُمْ تَذَكَّرُونَ ﴿٩٠﴾
{And @ the Day when We will resurrect among every nation a witness over them from themselves. And We will bring you, [O Muhammad], as a witness over your nation. And We have sent down to you the Book as clarification for all things and as guidance and mercy and good tidings for the Muslims. (89) Indeed, Allah orders justice and good conduct and giving to relatives and forbids immorality and bad conduct and oppression. He admonishes you that perhaps you will be reminded. (90)}
[Quran, chapter 16, verses 89-90]
and says:
....وَكَذَٰلِكَ جَعَلْنَاكُمْ أُمَّةً وَسَطًا لِّتَكُونُوا شُهَدَاءَ عَلَى النَّاسِ وَيَكُونَ الرَّسُولُ عَلَيْكُمْ شَهِيدًا
{And thus we have made you a just community that you will be witnesses over the people and the Messenger will be a witness over you...}
[Quran, chapter 2, verse 143];