The general mechanism of the reaction between amino groups and the carboxylic group could be summarized as follow:
In this reaction, amines can act as nucleophiles, due to the fact they have the lone pair of electrons on the nitrogen atom, they have a partial negative charge which is attracted to an electrophile (has a partial positive charge), in this case, the polarised carbon atom (as it is bonded to the highly electronegative oxygen atom) on the acetic anhydride.
Nitrogen begins its “attack” on the partially positive carbon. Because of the lone pair, it forms a dative covalent bond with the carbon. Because it is dative, the carbon atom has gained an electron therefore it has been reduced, so it then donates an electron within the double bond with oxygen to the oxygen atom, which makes the already partially negatively charged oxygen become negatively charged. There is now only a single bond between carbon and oxygen.
The carbon atom then donates an electron to the oxygen below it that it is also singly bonded to, releasing an acetate ion (CH3COO), this has given the carbon atom that donated the electron a positive charge as it has now had a net loss of one electron from its original electron configuration. This is now a carbocation. The hydrogen then bonds to the ethanoate ion, forming ethanoic acid (CH3COOH) and ethanamide, ethan- the prefix coming from the two carbon atoms present and the suffix –amide due to the CONH functional group.