Design vs Code (e.g. components, instances, etc)

Welcome to the forum!

When you add a component to a form, you get access to an instance of the component (maybe more than one if you added multiple buttons, for example). But the actual code for the components is in another class.

To use the components, you access their methods using e.g. self.button_1.methodname()

Classes get instantiated when you call open_form to open a particular form (or by default, the startup form gets instantiated automatically).

You might want to go through some of the tutorials, which cover these sorts of topics: Anvil | Tutorials