Latency is the delay between the time a cause is generated and the time the effect is noticeable.
For purposes of music recording engineering we can discuss the latency of recording equipment as, for example, the latency of soundcards. All soundcards have latency usually measured and marked on the box or manual. This latency measures the difference between the time an incoming signal is sent to the soundcard and the outgoing resulting signal is detected.
Latency in direct monitoring
Equipment that permits listening to the track being recorded while it is being recorded, permits direct monitoring. A vocalist, for example, can listen to their own vocals through the recording equipment, with the accompanying playback, while signing. In a simple, instrument-to-soundcard-to-software setup, this direct monitoring may be allowed by the recording software or earlier, by the soundcard.
If direct monitoring is used, low (small) latencies become very important. Typically, a delay of 10 milliseconds or less between the vocalist (or instrument) and headphones is acceptable. Larger latencies will confuse the vocalist.
In this same setup, lower latencies are usually achieved by reducing the amount of work done by the computer (e.g., closing other software), reducing the work of the software (e.g., removing unused tracks), bypassing processing by the operating system (e.g., using ASIO on Windows), and reducing the turnaround time needed to process pieces of the sound signal (e.g., reducing the size of audio buffers).