>>3268755Depends on the flash. Basic dumb flashes will have guide numbers on the back which tell you what aperture to use
Smarter flashed might have an onboard lightmeter. Set your power, set the aperture to what the flash tells you and it'll quench itself when enough light has returned to properly illuminate your subject (In theory)
Really smart flashes and bodies will do shit like TTL metering and will work automatically.
Your shutter should be at Sync speed - which is the fastest speed where the shutter is fully opened. At faster exposures, only a slit is ever exposed at once which can result in effects like the attached (Caused by another camera flash going off while the shutter was moving). If you want, you can merrily go slower than sync speed, to bring up background lights or the like.