When specific things happen to the application objects, the system automatically activates a trigger. Inside a trigger, developers can add C/AL code if they want to modify the default behavior of the application object or extend its functionality.
Triggers are same as Events in other programming language or in IDE. Different objects may have their different sets of triggers, e.g a Table field has OnValidate trigger, but a report object doesn't. Writing code on same object, but in it's different triggers may differ output.