The slasher is its own entity but requires a beacon-node to receive attestations.
To find malicious activity by validators, the slashers iterates through all received attestations until a slashable offense is found. Found slashings are broadcasted to the network and the next block proposer adds the proof to the block. The block proposer get the reward for slashing - not the whistleblower(=Slasher).