MusicTechHelpGuy breaks down attack and release on Logic Pro's stock compressor, using a kick drum to make the timing controls actually audible.
A faster attack squashes transients immediately, killing the punch and boominess of the kick. Rolling the attack up lets the front-end transient through, so the compressor mainly grabs the tail instead.
Release works the other way: a longer release keeps the tail of each hit compressed while the attack stays untouched, which is why he favors slower releases on drums.
He also flags the tradeoff. Push release too slow and the compressor never lets go, causing one hit's release to bleed into the next hit's attack. Finding that sweet spot is instrument-specific, and he demonstrates how it shifts the kick's character from boomy to punchy in real time.