As stated above, the vacuum is created by the pistons on the downward stroke when the carburetor throttle valve is partially closed. The more the throttle is closed, the higher the vacuum. There is some vacuum at wide open throttle, but very little and hard to measure if the carburetor is sized correctly.
The exhaust vacuum is created when the high pressure exhaust pulse is released into the port when the exhaust valve is opened. It leaves so fast it pulls a vacuum with it. With an exhaust vacuum, the engine can fill the cylinders with air and fuel above what a less tuned exhaust will. When both valves are open ( valve overlap ) the exhaust vacuum pulls fresh air / fuel from the intake ports into the cylinders, some of which goes on out the exhaust, the fresh mixture purges the cylinder of most if not all of the spent fuel from previous cycles.