This depends on the install.
If one heat pump per house operating on a shared ground loop, electricity used to power the heat pump is usually organised and paid for by the homeowner. The heat pump can be metered or the power to the heat pump will be metered via your electricity meter just as any other appliance in your home.
If a central heat pump supplying heat to multiple homes via a heat network, the owner of the heat network will charge the homeowner a heat price which includes the cost of running the heat pumps and network. You do not pay the electricity directly other than electricity for other appliances in your home.