Male circumcision is among the rites of Islam and is part of the (in Arabic): fitrah, or the innate disposition and natural character and instinct of the human creation.
Prophet Muhammad (peace be upon him) said, "Five are the acts quite akin to fitrah: Circumcision, clipping or shaving the pubes, cutting the nails, plucking or shaving the hair under the armpits and clipping (or shaving) the mustache." (Reported in Bukhari & Muslim)
As-Shawkani said in his book Nayl al-Awtar (1/184):
"What the Prophet (s.A.w.) means by Fitrah is that if these characteristics are followed by a man, he would be described as a man of Fitrah, which Allah (s.w.t.) has gifted his servants with, and encouraged them to follow, so that they attain a high degree of respectability and dignity."
Circumcision (removing the penile foreskin)
Clipping or shaving the hair around your pubic area
Keeping the fingernails neatly trimmed
Shaving the hair under the underarms
Keeping the mustache neatly trimmed or completely shaved
Allah ordered Prophet Muhammad (peace be upon him) to follow the religion of Ibrahim (peace be upon him). When Allah says:
"Then We inspired you: 'Follow the religion of Ibrahim, the upright in Faith'."
And part of the religion of Ibrahim is circumcision.
The Prophet Muhammad (peace be upon him) said: "The Prophet Ibrahim circumcised himself when he was eighty years old and he circumcised himself with an axe." (Related by Bukhari, Muslim & Ahmad.)
Ibn Abbas (r.a.) was asked "How old were you when the Prophet Muhammad (peace be upon him) died?" He replied, "At that time I had been circumcised. At that time people did not circumcise the boys till they attained the age of puberty (Baligh)." (Bukhari)
Most Fuqaha' (Islamic Jurists) say that circumcision is obligatory upon the men and this is the opinion of Jumhur (the majority of the scholars). If it were not obligatory, then Prophet Ibrahim (peace be upon him) would not have troubled himself at such a later stage of his life.
The Time for Circumcision:
During the time of the Prophet Muhammad (peace be upon him) circumcision was done for boys at the time of their Aqiqah
The Aqiqah a traditional celebration for the birth of a child which involves the sacrifice of an animal in thanks to Allah. That's the short answer as reported in al-Bayhaq.
Other Ahadith mention it being done later. The details here are not important but it goes without saying that this minor operation is easier on a baby than it is on an older boy. If it is essential, circumcision can be delayed for practical reasons, but it would be sensible to perform circumcision before the boy starts praying regularly due to practical purposes of simplifying Insinjaa & Taharah or being clean.
Abdullah Ibn Jabir (r.a.) and Aisha (r.a.) said:
"The Prophet (peace be upon him) performed the Aqiqah of al-Hasan and al-Hussein (the prophets grandsons) and circumcised them on the 7th. Day." (Related in al-Bayhaq & Tabarani)
* Contemplationist / Reflective Muslims do not endorse female circumcision under any circumstances.