Battery and BFD are two different products - both are drum sampler software instrument plug-ins. They run on your computer and interact with your audio/midi sequencing software. Generally speaking, a midi drum track(s) is fed from your sequencer to the drum sampler software. The midi track can be one that you've created yourself or obtained pre-made from some other source. The drum sampler takes the midi track (the midi track is like 'virtual' sheet music) and plays it using whatever drum sample sounds you've got loaded into the sampler software (Battery and BFD both come with a lot of samples), the same way your drum machine would if you were controlling it via midi, only this way everything's contained within the computer. The audio output of the drum sampler software is internally routed back into your sequencer software so that you can hear it, mix it, play along with it, etc.