While attributes are a great way to pass data between components there is one limitation. You can only pass data from a parent component to a child component. Not the other way around.
This is where events come in. Events lets a component send a message to a parent component. Component events works almost exactly like events for HTML elements.
Just like with attributes you can define events in the component right panel.
You must specify a name for the event as well as "Test value", an example of the payload the event will send along.
Just like with attributes, the test value is only used while developing your components and has no impact on how your application will run. In this case the test value is used by parent components when defining a workflow to execute when the event fires.
Unlike events for HTML elements, component events are not triggered automatically. To trigger an event you have to use the Trigger action for that event.
The data input for the Trigger action lets you set the payload data you wish to send with the event.
Learn more about using events here: