Use <aura:handler> in the markup of the handler component. For example:
<aura:handler name="sampleComponentEvent" event="c:compEvent" action="{!c.handleComponentEvent}"/>
The name attribute in <aura:handler> must match the name attribute in the <aura:registerEvent> tag in the component that fires the event.
The action attribute of <aura:handler> sets the client-side controller action to handle the event.
The event attribute specifies the event being handled. The format is namespace:eventName.
In this example, when the event is fired, the handleComponentEvent client-side controller action is called.
Component event handlers are associated with the bubble phase by default. To add a handler for the capture phase instead, use the phase attribute.
<aura:handler name="sampleComponentEvent" event="ns:eventName" action="{!c.handleComponentEvent}" phase="capture" />