This is more a PHP question than a WordPress one. WP’s add_action
and add_filter
functions just accept a PHP type known as “callables”.
Essentially, when you want to pass an object instance’s method as a callback, you do so using the syntax you see here – an array where the first element is the object instance, and the second element is the name of the method.