How does engine primer work?
It's just a syringe pump that draws gasoline from the fuel lines where they pass through the cabin.  The outlet of the primer pump runs though plumbing that becomes a network of very small (usually copper) lines snaking around the engine to one or more cylinders, where it terminates at each cylinder in a small nozzle threaded into the intake port just upstream of the intake valve. This plumbing network is completely separate from the fuel system under the cowling with the gascolator, hoses and carb.
I couldn't find any handy schematics online, so I made a silly sketch.  My own airplane runs primer to 3 cylinders like this.  You can prime all 4 or sometimes you see primer line only to one cylinder (airplanes that don't see much cold weather).

When you stroke the primer, it's like you're a doctor injecting something into your patient, except instead of an unfortunate person, you are pumping fuel into those lines running to the cylinders and spraying a mist of raw fuel into the intake port just up from the intake valve.  The fuel spreads around and settles on the walls of the intake port and duct, and starts to evaporate.
The evaporating fuel provides the additional fuel needed, beyond the carburetor's supply, to make the mixture rich enough for starting and to keep the engine running for a bit while it warms up, and works for a number of seconds after starting before the excess fuel has evaporated (by that time the engine is able to sustain itself on the carb's fuel - aircraft carbs normally run a richer than necessary mixture for the idle circuit, to help them run better when cold).  In non-aviation engines, a choke is used on the carb, but aviation practice traditionally avoids adding potential intake blocking gadgets like choke plates.
The more strokes you pump, the more fuel coats the intake passage.  When it's cold outside, you need more fuel to give a longer evaporation time so that the rich mixture lasts longer, so more strokes are required, although obviously, not too much or you flood it.
The caburetor has an accelerator pump that squirts extra fuel when you pump the throttle as well, but this is to help an already running engine cope with sudden power demands when the throttle is opened quickly.  You can pump the throttle to get extra fuel for starting, they way you used to do in ye olden tymes with carbureted cars, but too much fuel just dribbles down into the airbox when you do that and it creates a fire hazard, so it's not a good practice.
Fuel injected engines are primed in a similar way but they just use the injection system itself to spray fuel in when you turn the boost pump on with the mixture rich.  In those engines you don't stroke a pump, but just put the boost pump on, put the mixture to rich, count a couple of seconds, then pull it back to idle cutoff and hit the starter.