You may define variables in most GeneXus objects. They are local variables, which means that they are accessible only inside the object.
Once you are inside that object, you have many ways to define variables in a specific GeneXus object.
In general, GeneXus objects have a selector that lets you open a Variable Editor. For example:
Look at the Properties Editor on the right. There you can set the different properties related to the variable being defined or edited.
See also Collection variables