Attack: Adjust for the instrument size- A kick drum and bass are wide and have deep low end. Low end needs more time to reach full cycle. ie set the attack slow to allow the instrument fattness to get through. Around 30 and up ms.
Snares and plucky things like guitars and stabby synths have shorter wave cycles and need less time to get through ie about 10 - 20 ms on the attack. hats are very high and require tighter attack time and so on.
Slower attack lets transients through and faster chokes them off earlier.
Release: the amount of time for the compressor to reach its doing nothing state. If set too slow it will not have reached back to zero before the next transient. Too fast and attacky sounds with long tails will sound pumpy.
Ratio: 2 to 1 means a 2 db level increase will allow the gain output to increase 1 db holding it back 1db.... 4 to 1 allowing a 4 db increase to get a gain of 1db holding back 3 db etc.
Threshold: is the input to the compressor ratio detector. Its the gain to the chain of compression events. Call it side chain level input if you want.
Since a full song has all the sounds and is full band, slower attack time and fasterish release will do best. At that point song tempos and impact dictate how to set these.
Most mistakes are from too fast of an attack. You really have to nudge it all. Don't set one thing and move on, each control is dependent on the other at all times.
Don't be afraid to turn the hell out of the knobs. Swing them hard from 0 to 10 and use both hands on two setting if you have a hardware
compressor or assign a couple controls to software ones and move them hard at the same time to get a feel. Then slowly groove that into a place, shortening the throws of the knobs or faders until it settles in a vibe you like.
Then widen the attack a little cause it might be to tight anyway