Key Idea : The ease of nucleophilic substitution is depend upon the nature of leaving group. When the leaving tendency of a group in a compound is high, then the compound is more reactive towards nucleophilic substitution. The nucleophilic acyl substitution is completed in two steps as shown below 
The reactivity of the compound may be explained on the basicity of the leaving group. A weaker base is a better leaving group. The basicity order is as : Cl−>RCOO−>RO−>NH2− Hence, the order of leaving tendency is Cl−>RCOO−>R−O−>NH2− and therefore, the order of reactivity of acyl compound is as :
Acyl chloride > Acid anhydride > Ester > Amide