If you set the threshold too low, the audio will be compressed all the time and sound unnatural. We usually use a compressor to catch the louder peaks and make the track more consistent in volume. On the other hand, if we set our threshold too high, the compressor won't do anything at all.
Attack time is how quickly the compressor engages and reduces the volume of the audio. Different attack times can make a huge difference.
And it all depends on the instrument that you're compressing, the pace of the song, and hundreds of other factors.
We recommend to start with a slow attack time. You should be nearer 40ms to begin with.
This means that the whole note is compressed, rather than the attack of the note (the plectrum hitting the string of a guitar, for example). Because we are talking about milliseconds, everything is happening on a very small scale.
Sometimes you might want a fast attack e.g. a guitarist that picks really hard. Use shorter attack times to when you want to compress the transient as well as the sustain. But in most cases, a slow attack will sound a lot more natural and musical.
With vocals, it works slightly differently. Slow attack sometimes sounds unnatural and odd. Stay around 2-10ms for vocals and voice.
The release time is the exact opposite of attack. This is how long it takes for the compressor to return the audio to its normal volume after the audio drops below the threshold.
If the release time is too quick, the audio will sound very unnatural. But, if it's too slow, the compressor never turns off.
The best way to adjust release time is tweak it until the audio feels right with the rhythm and tempo of the song. There is no exact setting that suits every song or instrument. Start around 60ms and trust your ears.
Here's another chart, this time depicting how attack and release time affect the compression.
The red line is the original audio, and the blue line is the audio coming out of the compressor. Notice how the output lags behind the input due to the attack and release time of the compressor: