This reaction between a carboxylic acid and an alcohol in the presence of an acidic catalyst is called the Fischer Esterification. The overall reaction is
CH₃CH₂OH + CH₃C=OOH ⇒ CH₃CH₂C=OOCH₃ + H₂O
If you see closely, the change that happened here is that the CH₃COO- in the acetic acid is transferred to the ethanol by forming a carbonyl group, C=O. The remaining H⁺ in the acetic acid reacts with the remaining OH⁻ of the ethanol to form H₂O. But there are actually 5 steps that happened to get to the final products. The steps are shown in the picture. I actually got that online as a reference.
As a summary, the C in the acetic acid is protonated by the acid catalyst. So as a result, it becomes an attractive electrophile. It is more reactive so it will undergo substitution by the alcohol. The protonated H⁺ is transferred to one of the OH⁻ groups. Next, the water is replaced or removed to yield the deprotonated ester that is ethyl acetate.