How did Prophet Muhammad get his name?

Prophet's grangfather Abd-ul-Mutalib gave Him the name Muhammad & His mother Aminah gave Him the name Ahmad.