Buffeting is the structural response to excitation produced by the shock- induced flow separation, and isultimtely related to the vortex formation and breakdown. Buffeting may affect different parts of the airframe, but the buffeting on the wing is the most important.
As the speed increases the wing is affected by shock stall, whose appearance sets an upper limit to the speed. This limit is a function of the flight altitude. Its envelope is called buffeting boundary.
There are several ways to detect the presence of buffet/flow separation. For example: deviation of bending/rolling moment, local slope reduction, shock wave position, accelerometer recordings, etc.)
As for detection, there are several ways to removing or reducing the effect of buffeting, by either increasing the critical Mach number of minimizing the effects at transonic regimes, or both. For example: use wings with sweep back; use supercritical airfoils; decrease the wing loading.