Yes, and the process is more structured than most people realize.
When an inmate has an outstanding warrant from another jurisdiction, that jurisdiction places what is called a detainer on them. A detainer is a formal legal hold that notifies the facility currently housing the inmate that another agency has a claim on them. It essentially says do not release this person without notifying us first.
Once the current sentence or custody situation is resolved, or sometimes while it is still ongoing depending on the circumstances, the jurisdiction that issued the warrant will send law enforcement to transport the inmate to answer those charges. At the state level that is typically sheriff's deputies from the county where the warrant originated. At the federal level it is usually US Marshals. Either way, the transport is arranged by the requesting jurisdiction and they bear the cost and logistics of the pickup.
The timing is one of the more unpredictable parts of this process. There is no guaranteed deadline for when the pickup happens. The requesting jurisdiction has to schedule transport based on their own staffing and resources, and depending on the distance involved and how busy their transport operation is, that could happen within days of the current release or it could take weeks. What does not happen is the warrant disappearing. It stays active and the detainer stays in place until the jurisdiction comes to collect.
Any time your inmate spends in custody at the current facility after their sentence concludes while waiting for transport counts as time served toward whatever the new jurisdiction decides to charge them with.