In film photography using an electronic flash unit with an adjustable camera went like this...
Set asa on camera and flash unit.
Set shutter speed on camera that will synch with flash unit to make a full frame image in camera.
Look at subject, focus camera and read distance to subject.
Look at flash unit analog/slide type calculator for distance/f stop. Read f-stop. Set exact or set nearest f stop on camera lens.
Put camera to face, tell everybody to say "cheese" and snap shutter.
Some thoughts.
Using an original technology flash bulb type flash unit set camera on flash bulb (actual picture of flash bulb on camera shutter speed dial on early film cameras !!! You did not even have to know how to read.) Or set camera on 1/25 or 1/30 second to synch with flash bulb flash units.
On early film cameras, there was a lightening bolt picture on shutter speed dial to indicate shutter speed setting which synched with electronic flash unit.
Now this is where your whiz bang, super high tech, Buck Rogers camera comes in...Set camera for synch with electronic flash unit...or the camera does it for you !!! What will they think of next.? To understand digital camera to electronic flash synchronization, just read the manual. It will be some shutter speed or shutter speeds of like 1/125 second to like 1/3000 second.
The camera, flash unit or both may or may not set correct aperture for you. Again very Buck Rogerish. Answer is simple. Read manual.
To do yourself read manual to set camera on manual and flash on manual. Then read the first few lines above.
All you need is correct iso set on camera and flash.
Put camera and flash on manual setting.
Focus. Read distance on camera lens.
Find distance on flash calculator thingy. Read distance/aperture setting.
Turn/set aperture number on lens aperture ring thingy.
Tell everybody to say "cheese." Press shutter button to take pic.
And shucks. To answer your question about flash photography.
Focused light falls off the farther from light source.
So up close, you got more light and have to use a smaller f stop to get a proper exposure to make an image with the iso set on your camera.
Farther out, light level falls off, same iso setting, you need to open lens aperture to have enough light to make a properly exposed image.
There are limits, to close or to far. But in between, same power setting on flash, same iso setting on flash and camera, you should be able to set aperture to take a flash pic for every distance on the flash units built in manual calculator.