That comes from the coffee machine built into the galley, which uses the aircraft’s onboard potable water tanks.
Those tanks are filled from a hose by the ground crew during refueling.
(At least for major US airlines. I understand some other carriers serve instant coffee packets. Even then, the hot water still comes from the aircraft tanks.)