Every prophet is granted the power of performing miracles in order to give proof of the authenticity of his message, that it proceeds in fact from the Creator of the universe. A miracle is an act that cannot be performed by the aid of learning and practice.
Miracles must invariably conform to the mentality of the society in which a prophet is sent. Hence, the miracle of Moses (peace be upon him) was magic, because Pharaonic Egypt was expert in magic. Jesus (peace be upon him) cured the leper and the blind from birth, and quickened the dead by the will of Allah. This kind of miracle appealed because his society expected such act as proof of prophethood. Similarly our Prophet emerged amongst the Arabs who were experts in language and literature, and challenged them in their own art.