When you have registered for an event which you can no longer attend, it is important to unregister so you are not marked as being absent at the event.
To unregister, go to your personal space, then click on "My events".
Find the event concerned and click on "View event". On the right-hand side, you will have the option to unregister, as shown in the picture below.
If this button is not available, the deadline for unregistering has passed. The deadline is determined by the organiser when the event is created.