Vinegar, due to its acidity, will break down the calcium carbonate shell of the egg. This can be clearly visible in a change of the vinegar color. When you put the egg into water, a process called osmosis happens. The egg tries to maintain a balance of water inside the egg to that outside of the egg, so it will take in large amounts of the water it is currently in, making it swell.