How do you do it?
Well I’d start with a good read of the Manual - see: http://manual.audacityteam.org/o/man/auto_duck.html