Communication between apps in regards to music happens in two ways:
One way is to use a virtual midi device. In MAC it's built into the OS via Audio Midi Setup -> Midi Studio. In Windows it's via third party apps, "Virtual Midi" is one.
Another way is to send audio between two apps. This happens on a mac using SoundFlower for example (Blackhole that you mentioned in the comments is an alternative too). So you could be in a DAW and record audio from your computer, for example if you're watching youtube and you want to record the sound, or you want to record the sound from one DAW to another DAW.
So midi is if you want to send notes, or even commands between two midi enabled apps or hardware devices. Audio is if you just need the sound.