You just file a form with the clerk of the court. It's an order, but really a formal invitation - but like anything in the court, there is due process, which means you can challenge a subpoena. If served, you have to a least answer the demand to stay in honor. And in that process, the judge can dismiss or enforce the subpoena.
https://www.wikihow.com/Subpoena-a-Witness
You just file a form with the clerk of the court. It's an order, but really a formal invitation - but like anything in the court, there is due process, which means you can challenge a subpoena. If served, you have to a least answer the demand to stay in honor. And in that process, the judge can dismiss or enforce the subpoena.