Keyboard Maestro has a variety of triggers. A trigger describes how you start/execute/run a macro.
See the documentation for more information on triggers and how to use them.
Some available triggers include: