Disengage any effects plugins that you are using in the GarageBand project. Effects plugins such as delay, chorus and, especially, reverb will create a certain amount of latency because they tend to consume a large amount of processing power. Reapply the effects after recording without them. Click on the track header of the track that is experiencing latency. Open the "Track" menu and choose "Show Track Information." In the pop-up, click on the "Edit" tab and click on the blue power buttons for each effect to turn them off.
Close any other applications that are running, if possible. In some cases, you may have an audio interface that requires a specific application to be running. Leave applications of that type running, but close all others. This will free up further RAM and CPU for processing audio, which will help to reduce latency in GarageBand.
Increase your computer's on-board RAM. Adding even one gigabyte of RAM will greatly help with latency issues when recording digital audio. Audio on computers in general is very memory-intensive, so increasing the amount of available RAM will always improve performance.
Record only one track at a time, if possible. Recording a vocalist and a guitarist simultaneously, although ideal in most circumstances, will put a large processing burden on your computer that may result in latency on one or both tracks.
Monitor audio input from your audio interface, not directly from your computer, if possible. Most audio interfaces, such as the Apogee Duet and the RME Babyface, have dedicated monitoring outputs for headphones. Monitoring through the audio interface will relieve some of the load from your computer, thus helping to reduce latency. Consult your audio interface's documentation for details on monitoring.
Investigate your audio interface if the above measures were not sufficient for managing latency. In some cases, you may need an updated driver or other software in order for the interface to work efficiently with your computer. Older audio interfaces are particularly prone to this problem. Consult the manufacturer's support services for more information.