This defines a callable service and function name that are invoked after the service is instantiated to set up an element of it. An example of this are some of the services exposed on the new HTTP client, Guzzle:
http_handler_stack:
class: GuzzleHttp\HandlerStack
public: false
factory: GuzzleHttp\HandlerStack::create
configurator: ['@http_handler_stack_configurator', configure]
http_handler_stack_configurator:
class: Drupal\Core\Http\HandlerStackConfigurator
public: false
arguments: ['@service_container']
When Drupal goes to instantiate the http_handler_stack service, it first creates the GuzzleHttp\HandlerStack object, then retrieves the http_handler_stack_configurator service, instantiating it as necessary. It then calls the configure() function on that object passing the HandlerStack object to it.
Using a configurator allows you to decouple the configuration of a service from the service implementation itself. In the case of Guzzle, the configurator is responsible for loading any middleware and adding it to the HandlerStack. This allows the HandlerStack to allow runtime definition of middleware, as well having it defined when instantiated.