If you add an event for a component (for example a click event), the IDE adds a method that will be called when the user clicks on a component. You can write Pascal code in this method.

The form you are designing is (seen from the Pascal side) a class. You can access all its methods are properties. To understand this you must have a bit of knownledge of object oriented programming. I'm not sure wether you have had that already at school.