Resonance interaction for the carboxylate ion:
The charge of the carboxylate ion is on an oxygen atom, and because oxygen is electronegative, the charge is stabilized. Though, the charge can be shared along with the other oxygen leading to delocalization of the charge. This occurs through a resonance interaction among a lone pair of electrons on the negatively charged oxygen and the π electrons of the carbonyl group shown in figure. A lone pair of electrons on the 'bottom' oxygen creates a new π bond to the neighboring carbon. At similar time as this occurs, the weak π bond of the carbonyl group breaks. This is necessary or else the carbonyl carbon would end up with 5 bonds and that is not allowed.
Both of the electrons in the original π bond now end up on the 'top' oxygen that means that this oxygen ends up along with three lone pairs and gains a negative charge.
Note: The π bond and the charge have efficiently 'swapped places'. Both of the structures involved are known as resonance structures and are simply interconvertible.
The negative charge is now shared or delocalized evenly among both oxygens and is stabilized. Hence, ethanoic acid is a stronger acid as compared to one would expect based upon the electronegativity of oxygen alone.
Figure: Resonance interaction for the carboxylate ion.