An ester is like a special handshake between two chemicals. It happens when an alcohol and a carboxylic acid come together and exchange parts of themselves. The alcohol gives away its hydrogen atom, and the carboxylic acid gives away its oxygen atom. These two parts then join together to form a new molecule called an ester.
Just like how people have different handshakes, esters can vary in smell and taste depending on what chemicals are involved. Some smells we know, like the sweet smell of flowers, are because they contain esters. And some flavors we like, such as the taste of fruits, also come from esters.
So think of esters like a secret handshake that only certain chemicals can do to make a new compound that has a unique smell or taste.