Yeah rajitha I got u,
this is the summary of ur question,
the words of god was sent through an angel(gabriel(PBUH)) to prophet Mohammed(PBUH) this called as "WAHI" in arabic,
soon after the wahi was sent to prophet(PBUH) and due to Almigty Allah's(SWT)order he kept this as a practice to spread...