At slower shutter speeds the whole frame is exposed at the same time, at faster speeds the first and second shutter curtains travel at the same time so that only a small slit travels across the frame.
At the normal max sync speed the flash fires one pulse of light which won't be long enough to light the entire frame at higher than max sync speeds.
Some flash models have a mode called high speed sync which allows the use of higher shutter speeds than the camera's max sync speed. During this mode the flash fires several pulses of light for the entire duration of the exposure. This means that the entire frame is exposed to the light from the flash, rather than part of it.