The vacuum is created by the action of the piston in the cylinder. When piston travels down in the cylinder and the intake valve opens, a vacuum is created that sucks the fuel/air mixture into the cylinder. The intake valve closes, te piston moves up and compresses this mixture. A spark occurs and the piston is forced back down with the intake valve closed. Finally, the piston move back up as an exhaust valve opens to expell the burned fuel.
The fuel/air ratio is supposed to be precisely controlled. If there is a vacuum leak, this fuel to air ratio is upset and the engine doesn’t function as it should.
The vacuum is used to operate the power brake booster. In many cars, it operates the various doors that direct the flow of air through the heating and cooling system to the floor, the dashboard vents, or the defroster slots. On many cars of the 1940s through the 1960s, the windshield wipers were operated by vacuum. The school buses that I rode as an elementary student had vacuum operated windshield wipers. When the driver accelerated the bus, the wipers would come to a standstill on the windshield. When he released the accelerator the wipes would really fly back and forth across the windshield. What caused this? Think about the hose on a vacuum cleaner. If you put your hand over the hose, you can feel the pull increase. The same thing happened on the school bus when the driver released the accelerator. The plate in the carburetor restricted the airflow and increased the vacuum. Thus, the wipers sped up. On the other hand, when he depressed the accelerator, the plate in the carburetor opened and the airflow through the air intake increased. Therefore the vacuum was reduced and the wipers slowed down. When it was raining, the driver would have to release the accelerator to increase the vacuum to get the wipers to move. Rainy weather always meant a jerky ride to school.