Amides are derivatives of carboxylic acid. These have a carbonyl directly connected to nitrogen. Nitrogen can be bonded to hydrogens or additional carbons.
Esters are carboxylic acid derivatives which is one of the types of carbonyl compounds. –OH group of carboxylic acid was replaced by a group containing carbon containing –OR group.