You can use the auto quantize function to make your audio perfectly synced in time with your beat. Quantizing MIDI will make the audio clips automatically snap into place on the grid.
GarageBand will automatically analyze the audio waves and slide the large portions of the wave (the actual hitting of the notes on the instrument) left or right to make them snap to the time grid. This will make the notes you played sync in time with the beat.
