The exhaust gas recirculation valve, also known as the EGR valve, recirculates exhaust gas back into the intake, mainly in order to reduce combustion chamber temperatures and improve emissions. The EGR valve normally opens and closes based on engine temperature, RPM, and other various engine parameters. If the valve sticks open, unmetered air will be allowed into the engine, with symptoms similar to a vacuum leak, including a rough or bouncing idle and stalling. If the valve sticks in the closed position, the combustion chambers might get hotter than expected, resulting in pre-ignition where the extra heat makes the fuel start burning before the spark plug fires.
Before you start, you should disconnect the negative battery cable, particularly if the EGR valve has an electrical connector running to it. The EGR valve is usually located near or attached to the intake manifold, with a tube running to the exhaust manifold. There should also be a vacuum or electrical connector (or both) running to the valve which will need to be detached. To remove the EGR valve you will need to disconnect it from the intake where it is normally held in by several bolts and from the exhaust where a pipe is normally threaded over or into it. When removing the valve be careful to retain any gaskets, as these are normally reusable and can be quite expensive.
Because the valve itself can also be expensive, it may be worth it to try cleaning instead of changing the EGR valve. With the valve removed, spray some carb or intake cleaner into both the intake and exhaust ports of the valve, and use a brush to get everything as clean as possible. Allow it to dry thoroughly and then reinstall. If this doesn't resolve your problems you may need to purchase a new valve.
When replacing an EGR valve, be sure to remember to reinstall any gaskets, and replace them if they are missing or damaged. Start the bolts that go into the intake side, but leave them loose. Thread the pipe onto the other end of the EGR valve, and then tighten everything up, making sure that the valve is going on straight and isn't being twisted or forced into position. Reconnect any vacuum hoses or electrical connections, and reattach the negative battery cable. Start the car and listen for exhaust and vacuum leaks near the EGR valve, and then take the car for a test drive.