Attack is the first stage of a synthesizer function known as the ADSR envelope (attack, decay, sustain, release). In summary, ADSR controls how a sound changes over a period of time. The attack stage describes how long a note takes to reach its maximum volume from zero.
Different instruments have shorter and longer attack times, a piano or any instrument that is hit by something gives an immediate sound and this results in a quick attack. Instruments like the violin would show a longer attack due to how it is played with the bow.
To give you a better idea of how altering attack time can affect your sounds, imagine that you are creating a sweeping pad with a medium attack and medium release, the resulting sound will be well-rounded with the volume of the pad rising up and falling over time.
Using a fast attack and fast release will create a plucking effect, whereas setting attack time to zero with a fast release will give you a staccato effect. The combinations are endless, but the main idea to take away is that you can make subtle or drastic changes via the attack parameter.
Attack times can be affected by other audio signal processors such as compression and gating, these can end up having a negative effect on the quality of your sound’s attack. It’s wise to consider these factors when working on your overall sound and to be aware of knock-on effects.