An ester is a derivative of a carboxylic acid so we need to react a carboxylate acid with an alcohol to form an ester under acidic conditions. When the alcohol and carboxylic acid react, water is given off and the bond forms between the oxygen atom of the alcohol and the carbonyl carbon of the carboxylic acid.
If propanoic acid reacts with methanol for example, we will form the ester methylpropanoate. The name of the ester is derived from the name of the alcohol and the name of the acid. The alkyl part of the name comes from the alcohol and the -oate part comes from the acid.