EGR valves are just that: control valves. They get opened typically by throttle port vacuum (often with a vacuum amplifier because of the large amount of vacuum force required).
When Exhaust Gas is introduced to an already-mixed air/fuel ratio, it has the effect of leaning out the mixture because it adds physical volume to the amount of air. It also robs the combustion process of a small amount of oxygen for the purpose of reducing the peak temperature during the burn. This lowered temperature reduces nirtous oxides in the exhaust.
Under gentle throttle conditions, EGR will improve gas mileage slightly. It will cause lower HP at full throttle unless it drops out, as usually designed. If the vacuum diaphragm in the EGR valve gets leaky (a common problem), the engine will idle roughly and lose top-end power because the exhaust gas is always there. It normally should turn off at idle and high throttle settings.
That's 'the rest of the story'.