You need two tracks. Or busses.
One is for vocals only, the other for everything else.
In the "everything else" track/buss pro channel or fx bin insert any compressor which has a side-chain ability.
On the vocal track/bus set up a send which points to the compressor side-chain input. Turn it up. The volume you set the send to will affect how the compressor reacts, as will the compressor settings,
The goal side-chain will now be controlling the compressor. Adjust the compressor to give the gain reduction you want whenever the vocals are active and the vocal send likewise.
Just be aware that "dipping" music behind sung vocals in this way can sound very artificial compared with riding the faders, writing their movements to automation and adjusting the levels as you go. Ducking of this kind to allow vocals to be relatively louder than the music is most often used for e.g. dropping background music while an announcement is made.
It is a handy trick for preventing a bass line and kick drum from de-punching each other though. In that situation the send is on the kick track and the compressor is on the bass so that when the kick hits the bass is dropped in volume for just long enough to allow the kick transient to come through clearly.